16f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris/* 26f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * void * 36f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * chunk_alloc(void *new_addr, size_t size, size_t alignment, bool *zero, 46f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool *commit, unsigned arena_ind); 56f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris */ 66f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferristypedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, unsigned); 76f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris 86f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris/* 96f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool 106f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * chunk_dalloc(void *chunk, size_t size, bool committed, unsigned arena_ind); 116f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris */ 126f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferristypedef bool (chunk_dalloc_t)(void *, size_t, bool, unsigned); 136f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris 146f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris/* 156f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool 166f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * chunk_commit(void *chunk, size_t size, size_t offset, size_t length, 176f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * unsigned arena_ind); 186f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris */ 196f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferristypedef bool (chunk_commit_t)(void *, size_t, size_t, size_t, unsigned); 206f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris 216f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris/* 226f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool 236f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * chunk_decommit(void *chunk, size_t size, size_t offset, size_t length, 246f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * unsigned arena_ind); 256f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris */ 266f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferristypedef bool (chunk_decommit_t)(void *, size_t, size_t, size_t, unsigned); 276f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris 286f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris/* 296f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool 306f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * chunk_purge(void *chunk, size_t size, size_t offset, size_t length, 316f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * unsigned arena_ind); 326f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris */ 336f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferristypedef bool (chunk_purge_t)(void *, size_t, size_t, size_t, unsigned); 346f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris 356f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris/* 366f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool 376f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * chunk_split(void *chunk, size_t size, size_t size_a, size_t size_b, 386f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool committed, unsigned arena_ind); 396f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris */ 406f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferristypedef bool (chunk_split_t)(void *, size_t, size_t, size_t, bool, unsigned); 416f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris 426f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris/* 436f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool 446f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * chunk_merge(void *chunk_a, size_t size_a, void *chunk_b, size_t size_b, 456f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris * bool committed, unsigned arena_ind); 466f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris */ 476f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferristypedef bool (chunk_merge_t)(void *, size_t, void *, size_t, bool, unsigned); 486f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris 496f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferristypedef struct { 506f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris chunk_alloc_t *alloc; 516f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris chunk_dalloc_t *dalloc; 526f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris chunk_commit_t *commit; 536f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris chunk_decommit_t *decommit; 546f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris chunk_purge_t *purge; 556f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris chunk_split_t *split; 566f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris chunk_merge_t *merge; 576f50cbc975f782b7576ed699a7c2b123655d1b95Christopher Ferris} chunk_hooks_t; 58