diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-05-17 14:50:00 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-05-17 14:50:00 +0200 |
commit | d19617f06b4526bccc2fc5e5e15c43c754b99a4d (patch) | |
tree | cf74bc8e3c56a5d755028c57b02c2baf0c5f0c94 /lib/resource.h | |
parent | 144c10fad1ed6a2520abd1c43501ce00ea2699db (diff) | |
parent | 31874783c44dd59c355921908016f9b42d22ef02 (diff) |
Merge remote-tracking branch 'origin/int-new' into int-new
Diffstat (limited to 'lib/resource.h')
-rw-r--r-- | lib/resource.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/resource.h b/lib/resource.h index 1a0568b4..761c6adc 100644 --- a/lib/resource.h +++ b/lib/resource.h @@ -65,6 +65,11 @@ void *lp_allocu(linpool *, unsigned size); /* Unaligned */ void *lp_allocz(linpool *, unsigned size); /* With clear */ void lp_flush(linpool *); /* Free everything, but leave 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, LP_GOOD_SIZE(LP_GAS*4)) + /* Slabs */ typedef struct slab slab; |