mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-07 22:38:41 +00:00
gate for page pre-faulting on windows
This commit is contained in:
committed by
Ryan Fleury
parent
cb6443ce4e
commit
bd2cbfc127
@@ -8,6 +8,7 @@
|
||||
|
||||
#define ARENA_FREE_LIST 1
|
||||
#define NO_ASYNC 1
|
||||
#define NO_WIN32_RIO 1
|
||||
|
||||
// --- Code Base ---------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user