diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-07-17 12:54:18 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-17 12:55:47 +0200 |
commit | adeead24a3892e21fc19603bc5cb5abe57b181ca (patch) | |
tree | d07e7021e73be8b1cbd42352075c1afe8216771d /Libraries/LibC/malloc.cpp | |
parent | ab20c91cfb202aeb77298317a87f46a86d706e30 (diff) | |
download | serenity-adeead24a3892e21fc19603bc5cb5abe57b181ca.zip |
LibC: Fix MALLOC_DEBUG to work
Diffstat (limited to 'Libraries/LibC/malloc.cpp')
-rw-r--r-- | Libraries/LibC/malloc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibC/malloc.cpp b/Libraries/LibC/malloc.cpp index bde46394be..7ad9f087ae 100644 --- a/Libraries/LibC/malloc.cpp +++ b/Libraries/LibC/malloc.cpp @@ -195,7 +195,7 @@ void* malloc(size_t size) allocator->full_blocks.append(block); } #ifdef MALLOC_DEBUG - dbgprintf("LibC: allocated %p (chunk %d in block %p, size %u)\n", ptr, index, block, block->bytes_per_chunk()); + dbgprintf("LibC: allocated %p (chunk in block %p, size %u)\n", ptr, block, block->bytes_per_chunk()); #endif if (s_scrub_malloc) memset(ptr, MALLOC_SCRUB_BYTE, block->m_size); @@ -230,7 +230,7 @@ void free(void* ptr) auto* block = (ChunkedBlock*)page_base; #ifdef MALLOC_DEBUG - dbgprintf("LibC: freeing %p in allocator %p (size=%u, used=%u)\n", ptr, page, page->bytes_per_chunk(), page->used_chunks()); + dbgprintf("LibC: freeing %p in allocator %p (size=%u, used=%u)\n", ptr, block, block->bytes_per_chunk(), block->used_chunks()); #endif if (s_scrub_free) |