1typedef struct extent_hooks_s extent_hooks_t; 2 3/* 4 * void * 5 * extent_alloc(extent_hooks_t *extent_hooks, void *new_addr, size_t size, 6 * size_t alignment, bool *zero, bool *commit, unsigned arena_ind); 7 */ 8typedef void *(extent_alloc_t)(extent_hooks_t *, void *, size_t, size_t, bool *, 9 bool *, unsigned); 10 11/* 12 * bool 13 * extent_dalloc(extent_hooks_t *extent_hooks, void *addr, size_t size, 14 * bool committed, unsigned arena_ind); 15 */ 16typedef bool (extent_dalloc_t)(extent_hooks_t *, void *, size_t, bool, 17 unsigned); 18 19/* 20 * void 21 * extent_destroy(extent_hooks_t *extent_hooks, void *addr, size_t size, 22 * bool committed, unsigned arena_ind); 23 */ 24typedef void (extent_destroy_t)(extent_hooks_t *, void *, size_t, bool, 25 unsigned); 26 27/* 28 * bool 29 * extent_commit(extent_hooks_t *extent_hooks, void *addr, size_t size, 30 * size_t offset, size_t length, unsigned arena_ind); 31 */ 32typedef bool (extent_commit_t)(extent_hooks_t *, void *, size_t, size_t, size_t, 33 unsigned); 34 35/* 36 * bool 37 * extent_decommit(extent_hooks_t *extent_hooks, void *addr, size_t size, 38 * size_t offset, size_t length, unsigned arena_ind); 39 */ 40typedef bool (extent_decommit_t)(extent_hooks_t *, void *, size_t, size_t, 41 size_t, unsigned); 42 43/* 44 * bool 45 * extent_purge(extent_hooks_t *extent_hooks, void *addr, size_t size, 46 * size_t offset, size_t length, unsigned arena_ind); 47 */ 48typedef bool (extent_purge_t)(extent_hooks_t *, void *, size_t, size_t, size_t, 49 unsigned); 50 51/* 52 * bool 53 * extent_split(extent_hooks_t *extent_hooks, void *addr, size_t size, 54 * size_t size_a, size_t size_b, bool committed, unsigned arena_ind); 55 */ 56typedef bool (extent_split_t)(extent_hooks_t *, void *, size_t, size_t, size_t, 57 bool, unsigned); 58 59/* 60 * bool 61 * extent_merge(extent_hooks_t *extent_hooks, void *addr_a, size_t size_a, 62 * void *addr_b, size_t size_b, bool committed, unsigned arena_ind); 63 */ 64typedef bool (extent_merge_t)(extent_hooks_t *, void *, size_t, void *, size_t, 65 bool, unsigned); 66 67struct extent_hooks_s { 68 extent_alloc_t *alloc; 69 extent_dalloc_t *dalloc; 70 extent_destroy_t *destroy; 71 extent_commit_t *commit; 72 extent_decommit_t *decommit; 73 extent_purge_t *purge_lazy; 74 extent_purge_t *purge_forced; 75 extent_split_t *split; 76 extent_merge_t *merge; 77}; 78