From ad93d83421b146dd0bd238965ac504d78f30d6c8 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 21 Dec 2019 22:09:08 +1000 Subject: [PATCH] JitCodeBuffer: Don't leak code space on Windows --- src/common/jit_code_buffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/jit_code_buffer.cpp b/src/common/jit_code_buffer.cpp index fac148e69..1621e60b5 100644 --- a/src/common/jit_code_buffer.cpp +++ b/src/common/jit_code_buffer.cpp @@ -36,7 +36,7 @@ JitCodeBuffer::JitCodeBuffer(u32 size /* = 64 * 1024 * 1024 */, u32 far_code_siz JitCodeBuffer::~JitCodeBuffer() { #if defined(Y_PLATFORM_WINDOWS) - VirtualFree(m_code_ptr, m_total_size, MEM_RELEASE); + VirtualFree(m_code_ptr, 0, MEM_RELEASE); #elif defined(Y_PLATFORM_LINUX) || defined(Y_PLATFORM_ANDROID) munmap(m_code_ptr, m_total_size); #endif