Removes LowFragmentationHeap from Windows as it's enabled by default since Vista.
Differential Revision: https://code.wildfiregames.com/D5048 This was SVN commit r27720.
This commit is contained in:
parent
f8798c2245
commit
54c606e6aa
@ -255,31 +255,6 @@ static void FreeDirectories()
|
||||
wutil_Free(personalPath);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// memory
|
||||
|
||||
static void EnableLowFragmentationHeap()
|
||||
{
|
||||
if(IsDebuggerPresent())
|
||||
{
|
||||
// and the debug heap isn't explicitly disabled,
|
||||
char* var = getenv("_NO_DEBUG_HEAP");
|
||||
if(!var || var[0] != '1')
|
||||
return; // we can't enable the LFH
|
||||
}
|
||||
|
||||
#if WINVER >= 0x0501
|
||||
WUTIL_FUNC(pHeapSetInformation, BOOL, (HANDLE, HEAP_INFORMATION_CLASS, void*, size_t));
|
||||
WUTIL_IMPORT_KERNEL32(HeapSetInformation, pHeapSetInformation);
|
||||
if(pHeapSetInformation)
|
||||
{
|
||||
ULONG flags = 2; // enable LFH
|
||||
pHeapSetInformation(GetProcessHeap(), HeapCompatibilityInformation, &flags, sizeof(flags));
|
||||
}
|
||||
#endif // #if WINVER >= 0x0501
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Status wutil_SetPrivilege(const wchar_t* privilege, bool enable)
|
||||
@ -393,8 +368,6 @@ static Status wutil_Init()
|
||||
{
|
||||
InitLocks();
|
||||
|
||||
EnableLowFragmentationHeap();
|
||||
|
||||
GetDirectories();
|
||||
|
||||
return INFO::OK;
|
||||
|
Loading…
Reference in New Issue
Block a user