Changed the POOL_QALIGN flag to POOL_NO_QALIGN, reversing the setting
[rsync/rsync.git] / lib / pool_alloc.h
CommitLineData
7efdcf32
S
1#include <stddef.h>
2
3#define POOL_CLEAR (1<<0) /* zero fill allocations */
fb01d1fb 4#define POOL_NO_QALIGN (1<<1) /* don't align data to quanta */
7efdcf32 5#define POOL_INTERN (1<<2) /* Allocate extent structures */
51ce67d5 6#define POOL_PREPEND (1<<3) /* or prepend to extent data */
7efdcf32
S
7
8typedef void *alloc_pool_t;
9
4a19c3b2 10alloc_pool_t pool_create(size_t size, size_t quantum, void (*bomb)(const char *), int flags);
7efdcf32 11void pool_destroy(alloc_pool_t pool);
676e6041 12void *pool_alloc(alloc_pool_t pool, size_t size, const char *bomb_msg);
7efdcf32 13void pool_free(alloc_pool_t pool, size_t size, void *addr);
676e6041
WD
14void pool_free_old(alloc_pool_t pool, void *addr);
15void *pool_boundary(alloc_pool_t pool, size_t size);
7efdcf32 16
676e6041
WD
17#define pool_talloc(pool, type, count, bomb_msg) \
18 ((type *)pool_alloc(pool, sizeof(type) * count, bomb_msg))
7efdcf32
S
19
20#define pool_tfree(pool, type, count, addr) \
21 (pool_free(pool, sizeof(type) * count, addr))