7 hidden void *__expand_heap(size_t *);
9 hidden void *__memalign(size_t, size_t);
13 struct chunk *next, *prev;
22 #define SIZE_ALIGN (4*sizeof(size_t))
23 #define SIZE_MASK (-SIZE_ALIGN)
24 #define OVERHEAD (2*sizeof(size_t))
25 #define MMAP_THRESHOLD (0x1c00*SIZE_ALIGN)
27 #define RECLAIM 163840
29 #define CHUNK_SIZE(c) ((c)->csize & -2)
30 #define CHUNK_PSIZE(c) ((c)->psize & -2)
31 #define PREV_CHUNK(c) ((struct chunk *)((char *)(c) - CHUNK_PSIZE(c)))
32 #define NEXT_CHUNK(c) ((struct chunk *)((char *)(c) + CHUNK_SIZE(c)))
33 #define MEM_TO_CHUNK(p) (struct chunk *)((char *)(p) - OVERHEAD)
34 #define CHUNK_TO_MEM(c) (void *)((char *)(c) + OVERHEAD)
35 #define BIN_TO_CHUNK(i) (MEM_TO_CHUNK(&mal.bins[i].head))
37 #define C_INUSE ((size_t)1)
39 #define IS_MMAPPED(c) !((c)->csize & (C_INUSE))
41 hidden void __bin_chunk(struct chunk *);