#define MMALLOC_MAGIC "mmalloc" /* Mapped file magic number */
#define MMALLOC_MAGIC_SIZE 8 /* Size of magic number buf */
#define MMALLOC_VERSION 1 /* Current mmalloc version */
-#define MMALLOC_KEYS 16 /* Keys for application use */
/* The allocator divides the heap into blocks of fixed size; large
requests receive one or more whole blocks, and small requests
size_t nfree; /* Free fragments in a fragmented block. */
size_t first; /* First free fragment of the block. */
} frag;
- /* Size (in blocks) of a large cluster. */
- size_t size;
+ struct {
+ size_t size; /* Size (in blocks) of a large cluster. */
+ size_t busy_size;
+ } block;
} info;
} busy;
/* Heap information for a free block (that may be the first of
int fd;
- /* An array of keys to data within the mapped region, for use by the
- application. */
-
- void *keys[MMALLOC_KEYS];
-
};
int mmalloc_compare_heap(void *h1, void *h2, void *std_heap_addr);