Fast bin is using "size_t thissize = chunksize (p);". Using r->size directly gives wrong total and avail size data. if (r != NULL) while (r != bin) { ++sizes[NFASTBINS - 1 + i].count; sizes[NFASTBINS - 1 + i].total += r->size; sizes[NFASTBINS - 1 + i].from = MIN (sizes[NFASTBINS - 1 + i].from, r->size); sizes[NFASTBINS - 1 + i].to = MAX (sizes[NFASTBINS - 1 + i].to, r->size); r = r->fd; }
Probably it'll be good to have top chunk data shown for each arena. Not sure about last remainder since it is already in the unsorted bin.