From dfc40c7aa73989f018f4f0d4e9f483e335dc4e0f Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 9 Jun 2019 08:02:19 +0000 Subject: [PATCH] Core: Allocator fix git-svn-id: svn://ultimatepp.org/upp/trunk@13375 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/hheap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/Core/hheap.cpp b/uppsrc/Core/hheap.cpp index a381a4d03..5d57a810c 100644 --- a/uppsrc/Core/hheap.cpp +++ b/uppsrc/Core/hheap.cpp @@ -123,7 +123,7 @@ int Heap::HugeFree(void *ptr) LTIMING("Sys Free"); byte *sysblk = (byte *)h - 4096; size_t count = *((size_t *)sysblk); - SysFreeRaw(sysblk, count); + SysFreeRaw(sysblk, (count + 1) * 4096); huge_4KB_count -= count; sys_count--; sys_size -= 4096 * count;