tweak process working set size placement

This commit is contained in:
Ryan Fleury
2025-10-23 14:14:48 -07:00
parent 1d8abb1906
commit 721649b7ea
2 changed files with 11 additions and 11 deletions
+10 -10
View File
@@ -10308,6 +10308,16 @@ rd_frame(void)
}
#endif
//////////////////////////////
//- rjf: [windows] clear pages from working set shortly after startup, many of which will not be needed
//
#if OS_WINDOWS
if(rd_state->frame_index == 1) ProfScope("SetProcessWorkingSetSize")
{
SetProcessWorkingSetSize(GetCurrentProcess(), max_U64, max_U64);
}
#endif
//////////////////////////////
//- rjf: do per-frame resets
//
@@ -16589,16 +16599,6 @@ rd_frame(void)
}
}
//////////////////////////////
//- rjf: [windows] clear pages from working set shortly after startup, many of which will not be needed
//
#if OS_WINDOWS
if(rd_state->frame_index == 10)
{
SetProcessWorkingSetSize(GetCurrentProcess(), max_U64, max_U64);
}
#endif
rd_state->frame_depth -= 1;
scratch_end(scratch);
ProfEnd();