• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * void *
3 * chunk_alloc(void *new_addr, size_t size, size_t alignment, bool *zero,
4 *     bool *commit, unsigned arena_ind);
5 */
6typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, unsigned);
7
8/*
9 * bool
10 * chunk_dalloc(void *chunk, size_t size, bool committed, unsigned arena_ind);
11 */
12typedef bool (chunk_dalloc_t)(void *, size_t, bool, unsigned);
13
14/*
15 * bool
16 * chunk_commit(void *chunk, size_t size, size_t offset, size_t length,
17 *     unsigned arena_ind);
18 */
19typedef bool (chunk_commit_t)(void *, size_t, size_t, size_t, unsigned);
20
21/*
22 * bool
23 * chunk_decommit(void *chunk, size_t size, size_t offset, size_t length,
24 *     unsigned arena_ind);
25 */
26typedef bool (chunk_decommit_t)(void *, size_t, size_t, size_t, unsigned);
27
28/*
29 * bool
30 * chunk_purge(void *chunk, size_t size, size_t offset, size_t length,
31 *     unsigned arena_ind);
32 */
33typedef bool (chunk_purge_t)(void *, size_t, size_t, size_t, unsigned);
34
35/*
36 * bool
37 * chunk_split(void *chunk, size_t size, size_t size_a, size_t size_b,
38 *     bool committed, unsigned arena_ind);
39 */
40typedef bool (chunk_split_t)(void *, size_t, size_t, size_t, bool, unsigned);
41
42/*
43 * bool
44 * chunk_merge(void *chunk_a, size_t size_a, void *chunk_b, size_t size_b,
45 *     bool committed, unsigned arena_ind);
46 */
47typedef bool (chunk_merge_t)(void *, size_t, void *, size_t, bool, unsigned);
48
49typedef struct {
50	chunk_alloc_t		*alloc;
51	chunk_dalloc_t		*dalloc;
52	chunk_commit_t		*commit;
53	chunk_decommit_t	*decommit;
54	chunk_purge_t		*purge;
55	chunk_split_t		*split;
56	chunk_merge_t		*merge;
57} chunk_hooks_t;
58