Backed out changeset 38d2fe89e20e (Enable MemoryFailurePreventionEnabled by default for 32bit builds to throttle memory allocations when memory gets low (has no effect on 64bit builds)) because it seems to cause really bad effects
parent
2c750fb720
commit
46ccf2ed0e
|
|
@ -8655,13 +8655,13 @@
|
|||
<key>MemoryFailurePreventionEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If set, the viewer will try to throttle memory allocations when memory is low (32bit systems only)</string>
|
||||
<string>If set, the viewer will quit to avoid crash when memory failure happens</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MemoryLogFrequency</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -1474,11 +1474,6 @@ 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) ;
|
||||
}
|
||||
|
|
@ -1489,19 +1484,10 @@ 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 ;
|
||||
|
||||
// <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
|
||||
if(!gGLManager.mDebugGPU)
|
||||
{
|
||||
return;
|
||||
return ;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
if(MEMORY_CHECK_INTERVAL > mMemCheckTimer.getElapsedTimeF32())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue