summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-03-09 12:48:52 -0600
committerDave Parks <davep@lindenlab.com>2022-03-09 12:48:52 -0600
commit0e954a9afd7cc300bdd4cadfc25baa7f2607e5a4 (patch)
tree79c976e2bacf64f061f6cce20d248af89eb92103
parent2b2a5da0990def249dc028e0bb842843e51feed1 (diff)
SL-16972 Per feedback from Ansariel, only bump up max heap size on 64-bit builds.
-rw-r--r--indra/llcommon/llprocessor.cpp14
-rw-r--r--indra/llcommon/llprocessor.h14
-rw-r--r--indra/newview/app_settings/settings.xml15
-rw-r--r--indra/newview/llappviewer.cpp9
4 files changed, 33 insertions, 19 deletions
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp
index 5d16a4b74d..818df07bb2 100644
--- a/indra/llcommon/llprocessor.cpp
+++ b/indra/llcommon/llprocessor.cpp
@@ -44,20 +44,6 @@
#include "llsd.h"
-#if LL_MSVC && _M_X64
-# define LL_X86_64 1
-# define LL_X86 1
-#elif LL_MSVC && _M_IX86
-# define LL_X86 1
-#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) )
-# define LL_X86_64 1
-# define LL_X86 1
-#elif LL_GNUC && ( defined(__i386__) )
-# define LL_X86 1
-#elif LL_GNUC && ( defined(__powerpc__) || defined(__ppc__) )
-# define LL_PPC 1
-#endif
-
class LLProcessorInfoImpl; // foward declaration for the mImpl;
namespace
diff --git a/indra/llcommon/llprocessor.h b/indra/llcommon/llprocessor.h
index 90e5bc59ee..b77eb22c3a 100644
--- a/indra/llcommon/llprocessor.h
+++ b/indra/llcommon/llprocessor.h
@@ -29,6 +29,20 @@
#define LLPROCESSOR_H
#include "llunits.h"
+#if LL_MSVC && _M_X64
+# define LL_X86_64 1
+# define LL_X86 1
+#elif LL_MSVC && _M_IX86
+# define LL_X86 1
+#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) )
+# define LL_X86_64 1
+# define LL_X86 1
+#elif LL_GNUC && ( defined(__i386__) )
+# define LL_X86 1
+#elif LL_GNUC && ( defined(__powerpc__) || defined(__ppc__) )
+# define LL_PPC 1
+#endif
+
class LLProcessorInfoImpl;
class LL_COMMON_API LLProcessorInfo
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ebf9bfcfe8..17071d4a65 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6481,13 +6481,24 @@
<key>MaxHeapSize</key>
<map>
<key>Comment</key>
- <string>Maximum heap size (GB)</string>
+ <string>Maximum heap size on 32-bit builds (GB)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>4.0</real>
+ <real>1.6</real>
+ </map>
+ <key>MaxHeapSize64</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum heap size on 64-bit builds (GB)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>16.0</real>
</map>
<key>MaxPersistentNotifications</key>
<map>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 66c44ef6a6..61fc693b99 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1309,10 +1309,13 @@ void LLAppViewer::initMaxHeapSize()
//------------------------------------------------------------------------------------------
//currently SL is built under 32-bit setting, we set its max heap size no more than 1.6 GB.
- //F32 max_heap_size_gb = llmin(1.6f, (F32)gSavedSettings.getF32("MaxHeapSize")) ;
- F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ;
+ #ifndef LL_X86_64
+ F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ;
+#else
+ F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize64");
+#endif
- LLMemory::initMaxHeapSizeGB(max_heap_size_gb);
+ LLMemory::initMaxHeapSizeGB(max_heap_size_gb);
}
static LLTrace::BlockTimerStatHandle FTM_MESSAGES("System Messages");