LibGC: Pass correct args to VirtualFree

VirtualFree expects zero to be passed as size for MEM_RELEASE.
This commit is contained in:
R-Goc 2025-05-30 10:40:26 +02:00 committed by Andrew Kaster
parent 859991ca7b
commit 0de3a95433

View File

@ -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();
}