gate for page pre-faulting on windows

This commit is contained in:
Nikita Smith
2026-07-27 14:47:21 -07:00
committed by Ryan Fleury
parent cb6443ce4e
commit bd2cbfc127
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -8,6 +8,7 @@
#define ARENA_FREE_LIST 1
#define NO_ASYNC 1
#define NO_WIN32_RIO 1
// --- Code Base ---------------------------------------------------------------
+5
View File
@@ -272,14 +272,19 @@ internal B32
commit_memory(void *ptr, U64 size)
{
B32 result = (VirtualAlloc(ptr, size, MEM_COMMIT, PAGE_READWRITE) != 0);
#if !NO_WIN32_RIO
if(w32_rio_functions.RIORegisterBuffer)
{
// wine does not implement these functions
w32_rio_functions.RIODeregisterBuffer(w32_rio_functions.RIORegisterBuffer(ptr, size));
}
#endif
#if PROFILE_TELEMETRY
tmAlloc(0, ptr, size / 1024, "Win32 Commit");
#endif
return result;
}