]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/mempool.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
9 struct pool
*first_pool
;
15 void* mempool_alloc_tile(struct mempool
*mp
);
16 void* mempool_alloc0_tile(struct mempool
*mp
);
17 void mempool_free_tile(struct mempool
*mp
, void *p
);
19 #define DEFINE_MEMPOOL(pool_name, tile_type, alloc_at_least) \
20 static struct mempool pool_name = { \
21 .tile_size = sizeof(tile_type), \
22 .at_least = alloc_at_least, \
26 void mempool_drop(struct mempool
*mp
);