4 This file is part of systemd.
6 Copyright 2011-2014 Lennart Poettering
7 Copyright 2014 Michal Schmidt
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
28 struct pool *first_pool;
34 void* mempool_alloc_tile(struct mempool *mp);
35 void* mempool_alloc0_tile(struct mempool *mp);
36 void mempool_free_tile(struct mempool *mp, void *p);
38 #define DEFINE_MEMPOOL(pool_name, tile_type, alloc_at_least) \
39 static struct mempool pool_name = { \
40 .tile_size = sizeof(tile_type), \
41 .at_least = alloc_at_least, \
46 void mempool_drop(struct mempool *mp);