]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/mempool.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
10 struct pool
*first_pool
;
16 void* mempool_alloc_tile(struct mempool
*mp
);
17 void* mempool_alloc0_tile(struct mempool
*mp
);
18 void* mempool_free_tile(struct mempool
*mp
, void *p
);
20 #define DEFINE_MEMPOOL(pool_name, tile_type, alloc_at_least) \
21 static struct mempool pool_name = { \
22 .tile_size = sizeof(tile_type), \
23 .at_least = alloc_at_least, \
26 __attribute__((weak
)) bool mempool_enabled(void);
28 void mempool_trim(struct mempool
*mp
);