]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
adding cleanup of HLT memory pages
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Apr 2010 06:58:01 +0000 (06:58 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Apr 2010 06:58:01 +0000 (06:58 +0000)
HLT/BASE/AliHLTPluginBase.cxx

index 7fb83f970a32634b28ad633af8d20aac64759602..3f6c8fb603a8a0f6d181cb801d01f37961a6cb56 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "AliHLTPluginBase.h"
 #include "AliHLTSystem.h"
+#include "AliHLTDataBuffer.h"
 
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTPluginBase)
@@ -41,7 +42,17 @@ AliHLTPluginBase::AliHLTPluginBase()
 AliHLTPluginBase::~AliHLTPluginBase()
 {
   // see header file for class documentation
-  if (--fNofInstances<=0) delete fpSystem;
+  if (--fNofInstances<=0) {
+    delete fpSystem;
+
+    // 2010-04-07 not sure whether this is the best place for
+    // the global cleanup of memory pages. In case of AliReconstruction
+    // there is no cleanup method for the reconstructor plugins. They
+    // are just deleted at the end.
+    // However, here we can assume that some global cleanup takes place
+    // when we arrive at this point.
+    AliHLTDataBuffer::AliHLTRawPage::GlobalClean();
+  }
   fpSystem=NULL;
 }