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