summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2013-05-23 16:28:20 -0400
committerNat Goodspeed <nat@lindenlab.com>2013-05-23 16:28:20 -0400
commit3be79d5371c291264b12ecb3bf8daf0761bf1123 (patch)
tree49ff523969559f399e5f6912c7aa9afe4149d033 /indra/newview
parent7fad053982d835ff5b9ec496bc94ddbedc234dcc (diff)
MAINT-2724: Make viewer explicitly set coroutine stack size.
Introduce LLCoros::setStackSize(), with a compile-time default value we hope we never have to use. Make LLAppViewer call it with the value of the new settings variable CoroutineStackSize as soon as we've read settings files. (While we're at it, notify interested parties that we've read settings files.) Give CoroutineStackSize a default value four times the previous default stack size. Make LLCoros::launch() pass the saved stack size to each new coroutine instance. Re-enable lleventcoro integration test. Use LLSDMap() construct rather than LLSD::insert(), which used to return the modified object but is now void.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llappviewer.cpp12
2 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index b3538bf069..f356cff9d8 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1905,6 +1905,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>CoroutineStackSize</key>
+ <map>
+ <key>Comment</key>
+ <string>Size (in bytes) for each coroutine stack</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>262144</integer>
+ </map>
<key>CreateToolCopyCenters</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 45a990f65f..fdc2cdb78d 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -117,6 +117,7 @@
#include "llleap.h"
#include "stringize.h"
+#include "llcoros.h"
// Third party library includes
#include <boost/bind.hpp>
@@ -755,6 +756,7 @@ bool LLAppViewer::init()
//set the max heap size.
initMaxHeapSize() ;
+ LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize"));
LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ;
@@ -2810,6 +2812,16 @@ bool LLAppViewer::initConfiguration()
loadColorSettings();
+ // Let anyone else who cares know that we've populated our settings
+ // variables.
+ for (LLControlGroup::key_iter ki(LLControlGroup::beginKeys()), kend(LLControlGroup::endKeys());
+ ki != kend; ++ki)
+ {
+ // For each named instance of LLControlGroup, send an event saying
+ // we've initialized an LLControlGroup instance by that name.
+ LLEventPumps::instance().obtain("LLControlGroup").post(LLSDMap("init", *ki));
+ }
+
return true; // Config was successful.
}