diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:32:11 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:32:11 +0200 |
commit | 81aeccbb00bdc457c53bb8ab96715537513f7b2c (patch) | |
tree | bf35a54afc7d7df4b5a7fa0be022d4c540fd6c6e /lib/resource.h | |
parent | d7b077f5d63625beaca1bcfe971e3b853dbfcc06 (diff) | |
parent | d39ef961d1dde230c55fcc931b53f44cb34a1e63 (diff) |
Merge commit 'd39ef961d1dde230c55fcc931b53f44cb34a1e63' into haugesund
Diffstat (limited to 'lib/resource.h')
-rw-r--r-- | lib/resource.h | 8 |
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 */ |