From 740d52ab9a6524b76ccc8f0147bbbcaf0d973696 Mon Sep 17 00:00:00 2001 From: nomennescio Date: Fri, 1 Sep 2023 18:08:28 +0100 Subject: [PATCH] Refactor --- vm/os-windows.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vm/os-windows.cpp b/vm/os-windows.cpp index 8b48d08ac3..320b5dcee6 100644 --- a/vm/os-windows.cpp +++ b/vm/os-windows.cpp @@ -107,9 +107,7 @@ segment::segment(cell size_, bool executable_p) { } segment::~segment() { - SYSTEM_INFO si; - GetSystemInfo(&si); - if (!VirtualFree((void*)(start - si.dwPageSize), 0, MEM_RELEASE)) + if (!VirtualFree((void*)(start - getpagesize()), 0, MEM_RELEASE)) fatal_error("Segment deallocation failed", 0); } -- 2.34.1