From 0de3a954331729286415c129cd77d26b48ee66af Mon Sep 17 00:00:00 2001 From: R-Goc Date: Fri, 30 May 2025 10:40:26 +0200 Subject: [PATCH] LibGC: Pass correct args to VirtualFree VirtualFree expects zero to be passed as size for MEM_RELEASE. --- Libraries/LibGC/BlockAllocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibGC/BlockAllocator.cpp b/Libraries/LibGC/BlockAllocator.cpp index 79ab6efa5f6..fe5a59b869c 100644 --- a/Libraries/LibGC/BlockAllocator.cpp +++ b/Libraries/LibGC/BlockAllocator.cpp @@ -40,7 +40,7 @@ BlockAllocator::~BlockAllocator() VERIFY_NOT_REACHED(); } #else - if (!VirtualFree(block, HeapBlock::block_size, MEM_RELEASE)) { + if (!VirtualFree(block, 0, MEM_RELEASE)) { warnln("{}", Error::from_windows_error()); VERIFY_NOT_REACHED(); }