LibC: Fix malloc mmap byte tracking

I was incrementing instead of decrementing when freeing mmap allocs
This commit is contained in:
2026-07-16 10:04:21 +03:00
parent 64523b6c70
commit 7f25350c62

View File

@@ -305,7 +305,7 @@ void free(void* ptr)
const auto& header = static_cast<MmapAllocationHeader*>(ptr)[-1];
s_mmap_count--;
s_mmap_bytes += header.mmap_size;
s_mmap_bytes -= header.mmap_size;
munmap(static_cast<uint8_t*>(ptr) - header.offset, header.mmap_size);
}