summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsys.cpp
AgeCommit message (Collapse)Author
2017-05-10DRTVWR-418, MAINT-6996: Update Mac mem queries (per Drake Arconis)Nat Goodspeed
Drake points out that the OS X 64-bit-capable memory-query APIs recommended in comments by some long-ago maintainer are by now themselves obsolete. He offered this patch to update us to current macOS memory APIs.
2017-05-02DRTVWR-418, MAINT-6996: Rationalize LLMemory wrt 64-bit support.Nat Goodspeed
There were two distinct LLMemory methods getCurrentRSS() and getWorkingSetSize(). It was pointless to have both: on Windows they were completely redundant; on other platforms getWorkingSetSize() always returned 0. (Amusingly, though the Windows implementations both made exactly the same GetProcessMemoryInfo() call and used exactly the same logic, the code was different in the two -- as though the second was implemented without awareness of the first, even though they were adjacent in the source file.) One of the actual MAINT-6996 problems was due to the fact that getWorkingSetSize() returned U32, where getCurrentRSS() returns U64. In other words, getWorkingSetSize() was both useless *and* wrong. Remove it, and change its one call to getCurrentRSS() instead. The other culprit was that in several places, the 64-bit WorkingSetSize returned by the Windows GetProcessMemoryInfo() call (and by getCurrentRSS()) was explicitly cast to a 32-bit data type. That works only when explicitly or implicitly (using LLUnits type conversion) scaling the value to kilobytes or megabytes. When the size in bytes is desired, use 64-bit types instead. In addition to the symptoms, LLMemory was overdue for a bit of cleanup. There was a 16K block of memory called reserveMem, the comment on which read: "reserve 16K for out of memory error handling." Yet *nothing* was ever done with that block! If it were going to be useful, one would think someone would at some point explicitly free the block. In fact there was a method freeReserve(), apparently for just that purpose -- which was never called. As things stood, reserveMem served only to *prevent* the viewer from ever using that chunk of memory. Remove reserveMem and the unused freeReserve(). The only function of initClass() and cleanupClass() was to allocate and free reserveMem. Remove initClass(), cleanupClass() and the LLCommon calls to them. In a similar vein, there was an LLMemoryInfo::getPhysicalMemoryClamped() method that returned U32Bytes. Its job was simply to return a size in bytes that could fit into a U32 data type, returning U32_MAX if the 64-bit value exceeded 4GB. Eliminate that; change all its calls to getPhysicalMemoryKB() (which getPhysicalMemoryClamped() used internally anyway). We no longer care about any platform that cannot handle 64-bit data types.
2015-11-10remove execute permission from many files that should not have itOz Linden
2014-12-22work arounds to compile on linuxOz Linden
2014-10-17Update to build on Xcode 6.0: collection of similar const var not used ↵callum_linden
warnings/errors [-Wunused-const-variable]
2014-05-07merge changes for 3.7.7-releaseOz Linden
2014-03-19OPEN-199: replace the confusing STANDALONE switch with USESYSTEMLIBSOz Linden
2013-12-03SH-4641 FIX Interesting: Incorrect amount of system memory detected on MacRichard Linden
2013-12-02merge with releaseRichard Linden
2013-11-11Automated merge with http://bitbucket.org/lindenlab/viewer-releaseRichard Linden
2013-11-11Merge 3.6.11 for RC-abilityGraham Linden
2013-10-25Fix release merge issues (included upstream changes not yet in release from ↵Graham Linden
bear)
2013-09-11SH-4774 FIX: textures are blurry on MacRichard Linden
2013-09-09mergeRichard Linden
2013-09-09SH-4774 FIX: textures are blurry on MacRichard Linden
2013-09-09merge with viewer-releaseRichard Linden
2013-09-09Merge downstream code with viewer-releasesimon_linden
2013-08-22MAINT-2850 Fix for linux builddmitry
2013-08-21BUILDFIX: gcc build fixesRichard Linden
2013-08-21Fix file EOL formatSimon Linden
2013-08-20MAINT-2850 FIXED Windows 8.1 detected as running in windows 8 compatibility ↵dmitrykproductengine
mode always
2013-08-18SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 msRichard Linden
continued conversion to units system made units perform type promotion correctly and preserve type in arithmetic e.g. can now do LLVector3 in units added typedefs for remaining common unit types, including implicits
2013-08-16SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 msRichard Linden
converted many values over to units system in effort to track down source of 0 ping
2013-08-09second phase summer cleaningRichard Linden
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-07-19BUILDFIX: #include and dependency cleanupRichard Linden
2013-07-18SH-4297 WIP interesting: viewer-interesting starts loading cached scene lateRichard Linden
fixed ostream precision munging in llsys
2013-06-05merge with viewer-releaseRichard Linden
2013-06-05Unwind cruft from hunting for 2707 they won't end up in vwr-dev-matGraham Madarasz
2013-06-05BOOG2707 uncomment cleared suspectsGraham Madarasz
2013-06-04BUG-2707 make use of OsOutputDebugString _DEBUG only on Windows to avoid ↵Graham Madarasz
throwing unhandlable exceptions in coroutines in RelWithDebInfo builds
2013-06-02BUG-2707 fix unref'd varGraham Madarasz
2013-06-02BUG-2707 eliminate debug message and memory dump from FrameWatcher, which ↵Graham Madarasz
appears to be going off on login for some
2013-05-30BUG-2707 add some logging to help narrow down what part of login instance ↵Graham Madarasz
handling is going awry
2013-05-13Merged with https://bitbucket.org/lindenlab/viewer-betaGeenz
2013-04-19merge up to latest viewer-development for merge to 3.5.2Oz Linden
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-02-22Merge new boost and add OS X 10.8 modsGraham Madarasz (Graham Linden)
2013-01-22And thus, the demonic mouse position conversions from view space to screen ↵Geenz
space were tamed.
2013-01-04Automated merge with http://bitbucket.org/lindenlab/viewer-developmentRichard Linden
2012-11-14SH-3406 WIP convert fast timers to lltrace systemRichard Linden
cleaning up build moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc streamlined Time class and consolidated functionality in BlockTimer class llfasttimer is no longer included via llstring.h, so had to add it manually in several places
2012-11-07MAINT-1815 Fix for excessive memory usage in Mayfair. Disable tcmalloc. ↵Dave Parks
Disable private memory pools. Make viewer large address aware on windows. Reviewed by Kelly
2013-02-22linux version number fixesOz Linden
2013-02-21add OS version stringOz Linden
2012-01-10EXP-1525 FIXED Potential fix for a crash at shutdown: added some error ↵Vadim ProductEngine
handling to saving inventory cache.
2011-12-13storm-1729: ensure that cpu id has no leading or trailing spaces for ease of ↵Oz Linden
comparison and formatting
2011-08-11Automated merge with http://hg.secondlife.com/viewer-developmentRichard Linden
2011-08-05SH-2218 FIX -- v2.8.x Viewers crash consistently when I actively use other ↵Leslie Linden
applications * Mac memory stats now extracted from proper system calls. Reviewed by Nat Linden.
2011-08-03SH-2218 WORK AROUND -- v2.8.x Viewers crash consistently when I actively use ↵Leslie Linden
other applications * Just removed mac memory stats to make a low-risk work-around.
2011-07-12CHOP-753: Eliminate redundant array-of-pair-arrays in LLMemoryInfo.Nat Goodspeed
(per Monty code review) The notion of storing LLMemoryInfo data both as an LLSD::Map and an LLSD::Array of pair arrays arose from a (possibly misguided) desire to continue producing stats output into the viewer log in the same order it always used to be produced. There is no evidence that anyone cares about the order of those stats in the log; there is no other use case for preserving order. At Monty's recommendation, eliminate generating and storing the array-of-pair-arrays form: directly store LLSD::Map.
2011-07-12CHOP-753: Defend against boost::regex exceptions.Nat Goodspeed
(per Monty code review) Explain why we intentionally don't suppress exceptions from boost::regex objects constructed with string literals. Catch std::runtime_error from boost::regex_search() and boost::regex_match(); log and return false.