summaryrefslogtreecommitdiff
path: root/lib/resource.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-04-04 22:34:14 +0200
committerMaria Matejka <mq@ucw.cz>2022-04-06 18:14:08 +0200
commit7e86ff2076f3046c6dcca53e7756f112362aeee9 (patch)
tree0ae2e3ff87f37704af0c244e14fa116d1df238e7 /lib/resource.h
parentdabd7bccb3b9e2b7482cf4ae7619a67559f3ac94 (diff)
All linpools use pages to allocate regular blocks
Diffstat (limited to 'lib/resource.h')
-rw-r--r--lib/resource.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/resource.h b/lib/resource.h
index 8b180603..a4e110a5 100644
--- a/lib/resource.h
+++ b/lib/resource.h
@@ -69,9 +69,10 @@ typedef struct linpool linpool;
typedef struct lp_state {
void *current, *large;
byte *ptr;
+ uint total_large;
} lp_state;
-linpool *lp_new(pool *, unsigned blk);
+linpool *lp_new(pool *);
void *lp_alloc(linpool *, unsigned size); /* Aligned */
void *lp_allocu(linpool *, unsigned size); /* Unaligned */
void *lp_allocz(linpool *, unsigned size); /* With clear */
@@ -88,10 +89,7 @@ extern _Thread_local linpool *tmp_linpool; /* Temporary linpool autoflushed regu
#define tmp_init(p) tmp_linpool = lp_new_default(p)
#define tmp_flush() lp_flush(tmp_linpool)
-extern const int lp_chunk_size;
-#define LP_GAS 1024
-#define LP_GOOD_SIZE(x) (((x + LP_GAS - 1) & (~(LP_GAS - 1))) - lp_chunk_size)
-#define lp_new_default(p) lp_new(p, 0)
+#define lp_new_default lp_new
/* Slabs */