Skip to content
Snippets Groups Projects
  1. Mar 13, 2020
  2. Jun 02, 2018
  3. Jan 30, 2018
  4. May 10, 2017
  5. May 04, 2017
    • Nat Goodspeed's avatar
      DRTVWR-418, MAINT-6996: On Mac, obtain total mem, not resident mem. · 49cfd6d9
      Nat Goodspeed authored
      The LLMemory method getCurrentRSS() is defined to return the "resident set
      size," but in fact on Windows it returns the WorkingSetSize -- and that's
      actually what callers want from it: the total memory consumed by the
      application for statistics purposes. It's not really clear what users gain by
      knowing how much of that is resident in real memory, versus the total
      consumption. So despite the commentation and the method name itself, on Mac
      make it return the virtual size consumed.
      49cfd6d9
  6. May 02, 2017
    • Nat Goodspeed's avatar
      DRTVWR-418, MAINT-6996: Update Mac LLMemory::getCurrentRSS(). · 2bb19aec
      Nat Goodspeed authored
      Evidently the Mac implementation of LLMemory::getCurrentRSS() goes back to
      OS X 10.3, because there was a helpful comment of the form:
      
      ------
      The API used here is not capable of dealing with 64-bit memory sizes, but is
      available before 10.4.
      
      Once we start requiring 10.4, we can use the updated API, which looks like
      this:
      
      [new current implementation]
      
      Of course, this doesn't gain us anything unless we start building the viewer
      as a 64-bit executable, since that's the only way for our memory allocation to
      exceed 2^32.
      ------
      
      Hey, guess what, we're building 64-bit viewers now!
      
      Thank you, whoever thoughtfully noted that, both for calling out the issue and
      sparing us the research. (The comment goes back to Subversion days, so hg
      blame shows only the merge-to-release changeset.)
      2bb19aec
    • Nat Goodspeed's avatar
      DRTVWR-418, MAINT-6996: Rationalize LLMemory wrt 64-bit support. · 52899ed6
      Nat Goodspeed authored
      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.
      52899ed6
  7. Nov 22, 2016
  8. Nov 10, 2015
  9. Apr 27, 2015
  10. Oct 28, 2014
  11. Oct 27, 2014
  12. Sep 08, 2013
  13. Aug 26, 2013
  14. Aug 21, 2013
  15. Aug 20, 2013
  16. Aug 19, 2013
  17. Aug 16, 2013
  18. Aug 09, 2013
  19. Jul 08, 2013
  20. Jun 05, 2013
  21. Jun 04, 2013
  22. Jun 01, 2013
  23. Mar 29, 2013
  24. Nov 15, 2012
    • Richard Linden's avatar
      SH-3406 WIP convert fast timers to lltrace system · 9d77e030
      Richard Linden authored
      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
      9d77e030
  25. Oct 11, 2012
  26. Sep 12, 2012
  27. Sep 10, 2012
  28. Jan 04, 2012
  29. Dec 19, 2011
  30. Nov 22, 2011
  31. Oct 26, 2011
  32. Oct 14, 2011
  33. Oct 10, 2011
  34. Sep 08, 2011
  35. Sep 02, 2011
  36. Jul 20, 2011
Loading