mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 06:48: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 ARENA_FREE_LIST 1
|
||||||
#define NO_ASYNC 1
|
#define NO_ASYNC 1
|
||||||
|
#define NO_WIN32_RIO 1
|
||||||
|
|
||||||
// --- Code Base ---------------------------------------------------------------
|
// --- Code Base ---------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -272,14 +272,19 @@ internal B32
|
|||||||
commit_memory(void *ptr, U64 size)
|
commit_memory(void *ptr, U64 size)
|
||||||
{
|
{
|
||||||
B32 result = (VirtualAlloc(ptr, size, MEM_COMMIT, PAGE_READWRITE) != 0);
|
B32 result = (VirtualAlloc(ptr, size, MEM_COMMIT, PAGE_READWRITE) != 0);
|
||||||
|
|
||||||
|
#if !NO_WIN32_RIO
|
||||||
if(w32_rio_functions.RIORegisterBuffer)
|
if(w32_rio_functions.RIORegisterBuffer)
|
||||||
{
|
{
|
||||||
// wine does not implement these functions
|
// wine does not implement these functions
|
||||||
w32_rio_functions.RIODeregisterBuffer(w32_rio_functions.RIORegisterBuffer(ptr, size));
|
w32_rio_functions.RIODeregisterBuffer(w32_rio_functions.RIORegisterBuffer(ptr, size));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if PROFILE_TELEMETRY
|
#if PROFILE_TELEMETRY
|
||||||
tmAlloc(0, ptr, size / 1024, "Win32 Commit");
|
tmAlloc(0, ptr, size / 1024, "Win32 Commit");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user