summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmemory.h
AgeCommit message (Collapse)Author
2018-01-30MAINT-8091 Removed deprecated and unused private memory poolingAndrey Kleshchev
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.
2016-11-22DRTVWR-418: Use uintptr_t when casting pointers to ints.Nat Goodspeed
LLPrivateMemoryPool and LLPrivateMemoryPoolManager have assumed that it's always valid to cast a pointer to U32. With 64-bit pointers, no longer true.
2016-11-03Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2016-09-06add protections against failed memory allocations in VBO and aligned memoryOz Linden
2016-05-19Automated merge with tip of viewer-release to pick up 4.0.5callum_linden
2016-04-21DRTVWR-418 remove vestiges of TCMALLOC and GooglePerfTools from the viewercallum_linden
2015-11-10remove execute permission from many files that should not have itOz Linden
2015-09-30Merge downstream code, version 3.8.5AndreyL ProductEngine
2015-04-27MAINT-5042 FIXED SL Viewer Closes Unexpectedly in specific area with high ↵ruslantproductengine
RenderVolumeLODFactor - fix for review - fix in buffer overrun detector
2015-04-14Merge with viewer-release and become 3.7.28andreykproductengine
2014-10-27MAINT-4435 FIXED fix in llvolume.cpp Perform full build if number of verticesruslantproductengine
less than allowed. Changes in all other files relate auxiliary methods for catching similar bugs in future.
2014-08-29MergevilleGraham Linden
2014-07-11Fixed assert in llmemory.h for adjacent memory locations.Aura Linden
2014-05-29Mergeup to 3.7.9 viewer-releaseGraham Linden
2014-04-22Appease GCC 4.6.1 syntax problems with uintptr_t in alignment assertsGraham Linden
2014-02-06accidentally left _CrtCheckMemory defined in non-Windows buildsRichard Linden
2014-02-06added LL_TRACE_ENABLED to allow disabling of lltraceRichard Linden
2013-10-14changed ll_aligned_(malloc|free) to take alignment size as a template argumentRichard Linden
2013-10-08merge from viewer-releaseRichard Linden
2013-09-27BUILDFIX: fix for mac buildsRichard Linden
also, fixed alignment of tick labels on stat bars
2013-09-25better memory usage for LLTrace (tighter packing of recording arrays)Richard Linden
removed complicated and unnecessary fast timer gapless handoff logic (it should be gapless anyway) improved MemTrackable API, better separation of shadow and footprint added memory usage stats to floater_stats.xml
2013-08-27broke out llunit.h into llunittype.h and llunits.h for unit declarationsRichard Linden
changed unit declarations macros to make a lot more sense
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-07-08SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics ↵Richard Linden
console added percentage/ratio units added auto-range and auto tick calculation to stat bar to automate display stats
2013-06-05merge with viewer-releaseRichard Linden
2013-05-09Merge downstream code and viewer-betasimon
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-03-13Resurrect merge victim...restoring ll_memcpy_nonaliased_aligned_16 definitionGraham Madarasz (Graham Linden)
2013-03-13MergeGraham Madarasz (Graham Linden)
2013-03-13Cleanup per code review of prev change with DavePGraham Madarasz (Graham Linden)
2013-03-13Move fast memcpy to llcommon and use it in llalignedarray pushback on all ↵Graham Madarasz (Graham Linden)
platforms. Code Review: DaveP
2013-03-11Clean up moving llalignedarray and fast memcpy to llcommonGraham Madarasz
2013-03-11Move 16b aligned memcpy and alignment utilities to llmem in llcommon for ↵Graham Madarasz
easier use elsewhere
2013-03-04MAINT-2371 More optimizations.Dave Parks
Reviewed by Graham
2013-01-09SH-3468 WIP add memory tracking base classRichard Linden
made LLTrace::MemTrackable support custom alignment LLDrawable now uses MemTrackable new and delete operators
2013-01-04SH-3468 WIP add memory tracking base classRichard Linden
fix for compile error on windows ignore stdint.h even though VS2010 provides it
2013-01-03fixing linux compile errors for llcommon after LLTrace workAndrew Meadows
2012-11-20SH-3406 WIP convert fast timers to lltrace systemRichard Linden
fixes to merge
2012-11-19merge with viewer-developmentRichard Linden
2012-11-08Automated merge with http://bitbucket.org/lindenlab/viewer-developmentDave Parks
2012-10-18MAINT-1753: Correcting behavior of ll_aligned_realloc_16() on Linux to avoid ↵William Todd Stinson
memory corruption in the case that the new memory size requested is smaller than the old memory size. Also, adding check to ensure that the aligned malloc returns a non-null value before memcopying.
2012-10-15Merge in viewer-development code and fix buildsimon@Simon-PC.lindenlab.com
2012-10-04merge changes for DRTVWR-222Oz Linden
2012-10-02Instrument debug builds on windows to help track down source of heap corruptionDave Parks
2012-09-21SH-3275 WIP Run viewer metrics for object update messagesRichard Linden
added LLThreadLocalPtr broke llmutex out into llmutex.h got primary sampling buffer under thread local storage
2012-09-12MAINT-1503 Minimal set of changes needed to safely disable tcmallocDave Parks
2012-09-12initial attempt to restore changes that make removing tcmalloc possible; not ↵Oz Linden
tested
2012-09-12Handle the NULL case on ll_aligned_realloc_16 on linuxDave Parks