Remove an unused function in the old Process interface.
authorChandler Carruth <chandlerc@gmail.com>
Mon, 31 Dec 2012 22:17:59 +0000 (22:17 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 31 Dec 2012 22:17:59 +0000 (22:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171327 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Process.h
lib/Support/Unix/Process.inc
lib/Support/Windows/Process.inc

index 080634c8fc777a8d8331d690e62f645ab2df8680..6b29f57fc1c881c9597c0d5d30eca10afe48ab41 100644 (file)
@@ -110,13 +110,6 @@ public:
   /// allocated space.
   static size_t GetMallocUsage();
 
-  /// This static function will return the total memory usage of the
-  /// process. This includes code, data, stack and mapped pages usage. Notei
-  /// that the value returned here is not necessarily the Running Set Size,
-  /// it is the total virtual memory usage, regardless of mapped state of
-  /// that memory.
-  static size_t GetTotalMemoryUsage();
-
   /// This static function will set \p user_time to the amount of CPU time
   /// spent in user (non-kernel) mode and \p sys_time to the amount of CPU
   /// time spent in system (kernel) mode.  If the operating system does not
index b83f5079ce00bd2c647a97b93a8a1509000b8cb1..e96d37ce563fd941cd451b4dde3149bce16a094c 100644 (file)
@@ -92,26 +92,6 @@ size_t Process::GetMallocUsage() {
 #endif
 }
 
-size_t
-Process::GetTotalMemoryUsage()
-{
-#if defined(HAVE_MALLINFO)
-  struct mallinfo mi = ::mallinfo();
-  return mi.uordblks + mi.hblkhd;
-#elif defined(HAVE_MALLOC_ZONE_STATISTICS) && defined(HAVE_MALLOC_MALLOC_H)
-  malloc_statistics_t Stats;
-  malloc_zone_statistics(malloc_default_zone(), &Stats);
-  return Stats.size_allocated;   // darwin
-#elif defined(HAVE_GETRUSAGE) && !defined(__HAIKU__)
-  struct rusage usage;
-  ::getrusage(RUSAGE_SELF, &usage);
-  return usage.ru_maxrss;
-#else
-#warning Cannot get total memory size on this platform
-  return 0;
-#endif
-}
-
 void
 Process::GetTimeUsage(TimeValue& elapsed, TimeValue& user_time,
                       TimeValue& sys_time)
index 9ad7917714c9b8bfc501fb648b11b5c89b97bbda..d3a0c94e1ceec7f222b03b1b1908f7e7c312db0a 100644 (file)
@@ -78,14 +78,6 @@ Process::GetMallocUsage()
   return size;
 }
 
-size_t
-Process::GetTotalMemoryUsage()
-{
-  PROCESS_MEMORY_COUNTERS pmc;
-  GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc));
-  return pmc.PagefileUsage;
-}
-
 void
 Process::GetTimeUsage(
   TimeValue& elapsed, TimeValue& user_time, TimeValue& sys_time)