typedef char* type_name;
struct s_mm_diff {
- void *s_heap, *heapbase1, *heapbase2;
+ /** \brief Base address of the real heap */
+ void *s_heap;
+ /** \brief Base address of the first heap snapshot */
+ void *heapbase1;
+ /** \brief Base address of the second heap snapshot */
+ void *heapbase2;
malloc_info *heapinfo1, *heapinfo2;
size_t heaplimit;
// Number of blocks in the heaps:
state->heaplimit = ((struct mdesc *)heap1)->heaplimit;
+ // Mamailloute in order to find the base address of the main heap:
+ // This heavily depends on the structure of MC: we need to move this code into MC.
+ // (STD_HEAP_SIZE comes from mc.h anyway)
state->s_heap = (char *)mmalloc_get_current_heap() - STD_HEAP_SIZE - xbt_pagesize;
state->heapbase1 = (char *)heap1 + BLOCKSIZE;
void *breakval;
/* The end of the current memory region for this malloc heap. This is
- the first location past the end of mapped memory. */
+ the first location past the end of mapped memory.
+ Compared to breakval, this value is rounded to the next memory page.
+ */
void *top;