Using mallinfo only on Linux
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Aug 2004 07:51:51 +0000 (07:51 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Aug 2004 07:51:51 +0000 (07:51 +0000)
STEER/AliMemoryWatcher.cxx

index a4980ad..634c758 100644 (file)
@@ -110,6 +110,7 @@ void AliMemoryWatcher::Watch(Int_t x)
       fTimer->Stop();
     }
     if ( fUseMallinfo ) {
+#ifdef __linux
       static struct mallinfo meminfo;
       meminfo = mallinfo();
       fX[fSize] = x ;
@@ -117,6 +118,9 @@ void AliMemoryWatcher::Watch(Int_t x)
       fRSSIZE[fSize] =  meminfo.uordblks / 1024;
       fTIME[fSize] = fTimer->CpuTime();
       fSize++;
+#else
+      ::Fatal("Watch","Please SetUseMallinfo to kFALSE on this system");
+#endif
     } else {
       static Int_t vsize, rssize;
       static FILE* pipe = 0;