* need to enlist the free fragments.
*/
-#define SMALLEST_POSSIBLE_MALLOC (sizeof(struct list))
+//#define SMALLEST_POSSIBLE_MALLOC (sizeof(struct list))
+#define SMALLEST_POSSIBLE_MALLOC (16*sizeof(struct list))
#define MAX_FRAGMENT_PER_BLOCK (BLOCKSIZE / SMALLEST_POSSIBLE_MALLOC)
/* The difference between two pointers is a signed int. On machines where
size_t nfree; /* Free fragments in a fragmented block. */
size_t first; /* First free fragment of the block. */
unsigned short frag_size[MAX_FRAGMENT_PER_BLOCK];
- //void *bt[XBT_BACKTRACE_SIZE][MAX_FRAGMENT_PER_BLOCK]; /* Where it was malloced (or realloced lastly) */
+ void *bt[MAX_FRAGMENT_PER_BLOCK][XBT_BACKTRACE_SIZE]; /* Where it was malloced (or realloced lastly) */
} busy_frag;
struct {
size_t size; /* Size (in blocks) of a large cluster. */
};
-int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2);
+int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap);
void mmalloc_display_info(void *h);
+void *get_end_addr_heap(void *s_heap);
+
/* Bits to look at in the malloc descriptor flags word */
#define MMALLOC_DEVZERO (1 << 0) /* Have mapped to /dev/zero */