]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/mempool.h
dad4a4f9ccb565a37695041b903a387a1e691570
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 Copyright 2011-2014 Lennart Poettering
6 Copyright 2014 Michal Schmidt
14 struct pool
*first_pool
;
20 void* mempool_alloc_tile(struct mempool
*mp
);
21 void* mempool_alloc0_tile(struct mempool
*mp
);
22 void mempool_free_tile(struct mempool
*mp
, void *p
);
24 #define DEFINE_MEMPOOL(pool_name, tile_type, alloc_at_least) \
25 static struct mempool pool_name = { \
26 .tile_size = sizeof(tile_type), \
27 .at_least = alloc_at_least, \
31 void mempool_drop(struct mempool
*mp
);