summaryrefslogtreecommitdiff
path: root/indra/llcommon
AgeCommit message (Collapse)Author
2011-04-04fix the bug for mac and linux of continuously adjusting memory.Xiaohong Bao
2011-02-24fix the compiling error: "free" is defined and in use globally.Xiaohong Bao
2011-02-23add types to LLPrivateMemoryPoolXiaohong Bao
2011-02-23fix a merge errorXiaohong Bao
2011-02-23MergeXiaohong Bao
2011-02-23fix an assert errorXiaohong Bao
2011-02-23Automated merge with ssh://hg.lindenlab.com/bao/private-memory-poolXiaohong Bao
2011-02-23Merge from viewer-developmentXiaohong Bao
2011-02-14bump version number to 2.7.0Oz Linden
2011-02-05Introduces a LLThreadLocalData class that can beAleric Inglewood
accessed through the static LLThread::tldata(). Currently this object contains two (public) thread-local objects: a LLAPRRootPool and a LLVolatileAPRPool. The first is the general memory pool used by this thread (and this thread alone), while the second is intended for short lived memory allocations (needed for APR). The advantages of not mixing those two is that the latter is used most frequently, and as a result of it's nature can be destroyed and reconstructed on a "regular" basis. This patch adds LLAPRPool (completely replacing the old one), which is a wrapper around apr_pool_t* and has complete thread-safity checking. Whenever an apr call requires memory for some resource, a memory pool in the form of an LLAPRPool object can be created with the same life-time as this resource; assuring clean up of the memory no sooner, but also not much later than the life-time of the resource that needs the memory. Many, many function calls and constructors had the pool parameter simply removed (it is no longer the concern of the developer, if you don't write code that actually does an libapr call then you are no longer bothered with memory pools at all). However, I kept the notion of short-lived and long-lived allocations alive (see my remark in the jira here: https://jira.secondlife.com/browse/STORM-864?focusedCommentId=235356&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235356 which requires that the LLAPRFile API needs to allow the user to specify how long they think a file will stay open. By choosing 'short_lived' as default for the constructor that immediately opens a file, the number of instances where this needs to be specified is drastically reduced however (obviously, any automatic LLAPRFile is short lived). *** Addressed Boroondas remarks in https://codereview.secondlife.com/r/99/ regarding (doxygen) comments. This patch effectively only changes comments. Includes some 'merge' stuff that ended up in llvocache.cpp (while starting as a bug fix, now only resulting in a cleanup). *** Added comment 'The use of apr_pool_t is OK here'. Added this comment on every line where apr_pool_t is correctly being used. This should make it easier to spot (future) errors where someone started to use apr_pool_t; you can just grep all sources for 'apr_pool_t' and immediately see where it's being used while LLAPRPool should have been used. Note that merging this patch is very easy: If there are no other uses of apr_pool_t in the code (one grep) and it compiles, then it will work. *** Second Merge (needed to remove 'delete mCreationMutex' from LLImageDecodeThread::~LLImageDecodeThread). *** Added back #include <apr_pools.h>. Apparently that is needed on libapr version 1.2.8., the version used by Linden Lab, for calls to apr_queue_*. This is a bug in libapr (we also include <apr_queue.h>, that is fixed in (at least) 1.3.7. Note that 1.2.8 is VERY old. Even 1.3.x is old. *** License fixes (GPL -> LGPL). And typo in comments. Addresses merov's comments on the review board. *** Added Merov's compile fixes for windows.
2011-01-28trivial: convert to "unix return"Xiaohong Bao
2011-01-26add "pause" function for SH-846: design and implement the debug code to ↵Xiaohong Bao
locate memory leaking
2011-01-26for SH-846: design and implement the debug code to locate memory leakingXiaohong Bao
2011-01-19pull changes back from betaOz Linden
2011-01-15renamed temp name flag member in name cache to avoid confusion with similar ↵Oz Linden
names in other classes
2011-01-12trivial: fix some mac compiling errorsXiaohong Bao
2011-01-07fixed a hash bug, enlarged the overhead for large allocations, and add new ↵Xiaohong Bao
chunk to the tail of the linked list so new allocations go to oldest chunks first.
2011-01-07Merge from viewer-developmentDon Kjer
2011-01-07increment minor revision number to make version "2.6.0"Oz Linden
2011-01-06fix an exit crash.Xiaohong Bao
2011-01-06add the class LLPrivateMemoryPoolManagerXiaohong Bao
2011-01-06removed some debug code, redesigned the hash function, fixed bugsXiaohong Bao
2011-01-04a wroking version with a lot of debugging code (to be removed).Xiaohong Bao
2010-12-30STORM-955: VWR-24312: Massively duplicated objectsAleric Inglewood
Turns out that most of my SNOW-800 patch was included in Viewer 2 (albeit without crediting me). However, not everything was used and some more cleaning up was possible. After this patch, and when compiling with optimization, there are no duplicates left anymore that shouldn't be there in the first place. Apart from the debug stream iostream guard variable, there are several static variables with the same name (r, r1, r2, etc) but that indeed actually different symbol objects. Then there are a few constant POD arrays that are duplicated a hand full of times because they are accessed with a variable index (so optimizing them away is not possible). I left them like that (although defining those as extern as well would have been more consistent and not slower; in fact it would be faster theoretically because those arrays could share the same cache page then).
2010-12-22Merge with viewer-developmentDon Kjer
2010-12-21Merge from trunkAndrew A. de Laix
2010-12-17Merge from viewer-development post 2.4 releaseMonty Brandenberg
2010-12-15Merge from don_linden/viewer-sandboxDon Kjer
2010-12-15pulling fixes back from viewer-betaOz Linden
2010-12-14Automated merge with https://bitbucket.org/mani_linden/viewer-developmentNat Goodspeed
2010-12-14SWAT-352: when loading lleventhost, call apr_dso_error() function.Nat Goodspeed
In addition to its usual apr_sterror() function, APR defines a special function specifically for errors relating to the apr_dso_*() functions. Introduce ll_apr_warn_status() and ll_apr_assert_status() overloads accepting apr_dso_handle_t* to call apr_dso_error() as well as apr_strerror() and log its output. Use new ll_apr_warn_status() in LLAppViewer::loadEventHostModule() for apr_dso_load() and apr_dso_sym() calls. Instead of shorthand ll_apr_assert_status(), use with llassert_always() so check is still performed even in Release build. Add more lleventhost-related debugging output, e.g. full pathname of the DLL. On Mac and Linux, call 'file' command to report nature of the DLL too.
2010-12-14Mergebrad kittenbrink
2010-12-13permit flush when disabled.Andrew A. de Laix
2010-12-13Merge from viewer-developmentDon Kjer
2010-12-10Automated merge with https://bitbucket.org/mani_linden/viewer-development/Andrew A. de Laix
2010-12-10fix possible crash on shutdown in event queue flush.Andrew A. de Laix
2010-12-10fix working directory in install script and remove dependency on open option ↵Andrew A. de Laix
--args which is 10.6 only. Also fix erroneous check in process launcher which was mistakenly reporting a failed execution of the new updater script.
2010-12-10fix crash if posting event during shutdown.Andrew A. de Laix
2010-12-09Pull from viewer-betaMerov Linden
2010-12-09merge from http://hg.secondlife.com/viewer-developmentMonty Brandenberg
2010-12-08test code and some code changeXiaohong Bao
2010-12-08Merge from http://bitbucket.org/simon_linden/viewer-devDon Kjer
2010-12-08CHOP-239: reconcile LL_VERSION_BUNDLE_ID with Info-SecondLife.plist.Nat Goodspeed
The bundle ID is found in llversionviewer.h, Info-SecondLife.plist and mac_updater.cpp. The latter two state it as "com.secondlife.indra.viewer". llversionviewer.h stated it as "com.secondlife.snowglobe.viewer". Changing it to "indra" to be consistent. For further discussion, please see the Jira.
2010-12-03first iteration of memory pool codeXiaohong Bao
2010-12-02ESC-211 Metrics data sink - fix delivery by viewerMonty Brandenberg
The TextureFetch thread was still stalling out due to a different path that determines whether there is work or not in the thread (uses getPending()) and that had to be harmonized with the changes to runCondition(). I'm not happy with this solution but a refactor of the LLThread tree isn't in the cards right now.
2010-11-24Pull from viewer-betaMerov Linden
2010-11-23[mq]: thread_state_fixAndrew A. de Laix
2010-11-22increment viewer version number to 2.5Oz Linden
2010-11-19ER-330 : Improve ObjectUpdateCached message packing. Added some viewer ↵Dave SIMmONs
metrics, will disable later.
2010-11-19Automated merge with http://bitbucket.org/lindenlab/viewer-developmentBill Curtis