1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Linpools may use pages instead of xmalloc

This commit is contained in:
Maria Matejka
2021-09-03 19:48:38 +02:00
parent bea582cbb5
commit e5a8eec6d7
2 changed files with 19 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ void lp_restore(linpool *m, lp_state *p); /* Restore state */
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))
#define lp_new_default(p) lp_new(p, 0)
/* Slabs */