9 struct chunk *next, *prev;
18 #define SIZE_ALIGN (4*sizeof(size_t))
19 #define SIZE_MASK (-SIZE_ALIGN)
20 #define OVERHEAD (2*sizeof(size_t))
21 #define MMAP_THRESHOLD (0x1c00*SIZE_ALIGN)
23 #define RECLAIM 163840
25 #define CHUNK_SIZE(c) ((c)->csize & -2)
26 #define CHUNK_PSIZE(c) ((c)->psize & -2)
27 #define PREV_CHUNK(c) ((struct chunk *)((char *)(c) - CHUNK_PSIZE(c)))
28 #define NEXT_CHUNK(c) ((struct chunk *)((char *)(c) + CHUNK_SIZE(c)))
29 #define MEM_TO_CHUNK(p) (struct chunk *)((char *)(p) - OVERHEAD)
30 #define CHUNK_TO_MEM(c) (void *)((char *)(c) + OVERHEAD)
31 #define BIN_TO_CHUNK(i) (MEM_TO_CHUNK(&mal.bins[i].head))
33 #define C_INUSE ((size_t)1)
35 #define IS_MMAPPED(c) !((c)->csize & (C_INUSE))
37 hidden void __bin_chunk(struct chunk *);