| Index: fusl/src/malloc/malloc.c
|
| diff --git a/fusl/src/malloc/malloc.c b/fusl/src/malloc/malloc.c
|
| index ccf1f61242f556497d2968811efb71eef9db3a21..468cfbda2d9bd0783e870f4afe42c88a6b44f3e8 100644
|
| --- a/fusl/src/malloc/malloc.c
|
| +++ b/fusl/src/malloc/malloc.c
|
| @@ -134,23 +134,20 @@ static int bin_index_up(size_t x) {
|
| }
|
|
|
| #if 0
|
| -void __dump_heap(int x)
|
| -{
|
| - struct chunk *c;
|
| - int i;
|
| - for (c = (void *)mal.heap; CHUNK_SIZE(c); c = NEXT_CHUNK(c))
|
| - fprintf(stderr, "base %p size %zu (%d) flags %d/%d\n",
|
| - c, CHUNK_SIZE(c), bin_index(CHUNK_SIZE(c)),
|
| - c->csize & 15,
|
| - NEXT_CHUNK(c)->psize & 15);
|
| - for (i=0; i<64; i++) {
|
| - if (mal.bins[i].head != BIN_TO_CHUNK(i) && mal.bins[i].head) {
|
| - fprintf(stderr, "bin %d: %p\n", i, mal.bins[i].head);
|
| - if (!(mal.binmap & 1ULL<<i))
|
| - fprintf(stderr, "missing from binmap!\n");
|
| - } else if (mal.binmap & 1ULL<<i)
|
| - fprintf(stderr, "binmap wrongly contains %d!\n", i);
|
| - }
|
| +void __dump_heap(int x) {
|
| + struct chunk* c;
|
| + int i;
|
| + for (c = (void*)mal.heap; CHUNK_SIZE(c); c = NEXT_CHUNK(c))
|
| + fprintf(stderr, "base %p size %zu (%d) flags %d/%d\n", c, CHUNK_SIZE(c),
|
| + bin_index(CHUNK_SIZE(c)), c->csize & 15, NEXT_CHUNK(c)->psize & 15);
|
| + for (i = 0; i < 64; i++) {
|
| + if (mal.bins[i].head != BIN_TO_CHUNK(i) && mal.bins[i].head) {
|
| + fprintf(stderr, "bin %d: %p\n", i, mal.bins[i].head);
|
| + if (!(mal.binmap & 1ULL << i))
|
| + fprintf(stderr, "missing from binmap!\n");
|
| + } else if (mal.binmap & 1ULL << i)
|
| + fprintf(stderr, "binmap wrongly contains %d!\n", i);
|
| + }
|
| }
|
| #endif
|
|
|
|
|