diff options
author | Daan Leijen <daan@microsoft.com> | 2022-04-09 14:08:27 -0700 |
---|---|---|
committer | Daan Leijen <daan@microsoft.com> | 2022-04-09 14:08:27 -0700 |
commit | 016b2ad5352de399af167a1acb6042cee31f8fbe (patch) | |
tree | fe8ba93614f0b49d41f7baf96b338c16200e6a50 /test | |
parent | adc8b3187c4ec19fe4e8e8bb2f5aae4e9eb4bba3 (diff) |
nicer heap walk test
Diffstat (limited to 'test')
-rw-r--r-- | test/main-override-static.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/main-override-static.c b/test/main-override-static.c index e64b987..a5088d3 100644 --- a/test/main-override-static.c +++ b/test/main-override-static.c @@ -194,7 +194,12 @@ static void alloc_huge(void) { } static bool test_visit(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg) { - printf("I'm visiting a block of size %zu, allocated size %zu\n", block_size, mi_usable_size(block)); + if (block == NULL) { + printf("visiting an area with blocks of size %zu (including padding)\n", area->full_block_size); + } + else { + printf(" block of size %zu (allocated size is %zu)\n", block_size, mi_usable_size(block)); + } return true; } |