Backout the backout because Whirly wants it ;)
parent
46ccf2ed0e
commit
cd37cccb46
|
|
@ -8655,13 +8655,13 @@
|
|||
<key>MemoryFailurePreventionEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If set, the viewer will quit to avoid crash when memory failure happens</string>
|
||||
<string>If set, the viewer will try to throttle memory allocations when memory is low (32bit systems only)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>MemoryLogFrequency</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -1474,6 +1474,11 @@ void LLAppViewer::initMaxHeapSize()
|
|||
//F32 max_heap_size_gb = llmin(1.6f, (F32)gSavedSettings.getF32("MaxHeapSize")) ;
|
||||
F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ;
|
||||
BOOL enable_mem_failure_prevention = (BOOL)gSavedSettings.getBOOL("MemoryFailurePreventionEnabled") ;
|
||||
// <FS:Ansariel> Enable low memory checks on 32bit builds
|
||||
#ifdef ND_BUILD64BIT_ARCH
|
||||
enable_mem_failure_prevention = FALSE;
|
||||
#endif
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLMemory::initMaxHeapSizeGB(max_heap_size_gb, enable_mem_failure_prevention) ;
|
||||
}
|
||||
|
|
@ -1484,10 +1489,19 @@ void LLAppViewer::checkMemory()
|
|||
//const static F32 MAX_QUIT_WAIT_TIME = 30.0f ; //seconds
|
||||
//static F32 force_quit_timer = MAX_QUIT_WAIT_TIME + MEMORY_CHECK_INTERVAL ;
|
||||
|
||||
if(!gGLManager.mDebugGPU)
|
||||
// <FS:Ansariel> Enable low memory checks on 32bit builds
|
||||
//if(!gGLManager.mDebugGPU)
|
||||
//{
|
||||
// return ;
|
||||
//}
|
||||
#ifndef ND_BUILD64BIT_ARCH
|
||||
static LLCachedControl<bool> mem_failure_prevention(gSavedSettings, "MemoryFailurePreventionEnabled");
|
||||
if (!mem_failure_prevention)
|
||||
#endif
|
||||
{
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
if(MEMORY_CHECK_INTERVAL > mMemCheckTimer.getElapsedTimeF32())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue