]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/mempool.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2011-2014 Lennart Poettering
8 Copyright 2014 Michal Schmidt
16 struct pool
*first_pool
;
22 void* mempool_alloc_tile(struct mempool
*mp
);
23 void* mempool_alloc0_tile(struct mempool
*mp
);
24 void mempool_free_tile(struct mempool
*mp
, void *p
);
26 #define DEFINE_MEMPOOL(pool_name, tile_type, alloc_at_least) \
27 static struct mempool pool_name = { \
28 .tile_size = sizeof(tile_type), \
29 .at_least = alloc_at_least, \
34 void mempool_drop(struct mempool
*mp
);