Elbeem: fix memory leak and add guarded allocator directives
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 27 Sep 2013 18:55:26 +0000 (18:55 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 27 Sep 2013 18:55:26 +0000 (18:55 +0000)
25 files changed:
intern/elbeem/CMakeLists.txt
intern/elbeem/SConscript
intern/elbeem/intern/attributes.h
intern/elbeem/intern/controlparticles.h
intern/elbeem/intern/isosurface.h
intern/elbeem/intern/mvmcoords.h
intern/elbeem/intern/ntl_blenderdumper.h
intern/elbeem/intern/ntl_bsptree.h
intern/elbeem/intern/ntl_geometryclass.h
intern/elbeem/intern/ntl_geometrymodel.h
intern/elbeem/intern/ntl_geometryobject.h
intern/elbeem/intern/ntl_geometryshader.h
intern/elbeem/intern/ntl_lighting.h
intern/elbeem/intern/ntl_matrices.h
intern/elbeem/intern/ntl_ray.h
intern/elbeem/intern/ntl_vector3dim.h
intern/elbeem/intern/ntl_world.h
intern/elbeem/intern/parametrizer.h
intern/elbeem/intern/particletracer.cpp
intern/elbeem/intern/particletracer.h
intern/elbeem/intern/simulation_object.h
intern/elbeem/intern/solver_class.h
intern/elbeem/intern/solver_control.cpp
intern/elbeem/intern/solver_control.h
intern/elbeem/intern/solver_interface.h

index 2adeb57..887abea 100644 (file)
@@ -25,6 +25,7 @@
 
 set(INC
        extern
+       ../guardedalloc
 )
 
 set(INC_SYS
index 133f02e..e3a20cf 100644 (file)
@@ -43,6 +43,6 @@ if env['WITH_BF_OPENMP']:
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
     defs += ' USE_MSVC6FIXES'
 incs += ' ' + env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] 
-incs += ' extern '
+incs += ' extern ../../guardedalloc'
 
 env.BlenderLib ('bf_intern_elbeem', sources, Split(incs), Split(defs), libtype='intern', priority=0 )
index b2fbd7f..f561731 100644 (file)
 #ifndef NTL_ATTRIBUTES_H
 
 #include "utilities.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 template<class T> class ntlMatrix4x4;
 class ntlSetVec3f;
 std::ostream& operator<<( std::ostream& os, const ntlSetVec3f& i );
@@ -110,6 +115,11 @@ class AnimChannel
                vector<Scalar> mValue;
                /*! anim channel attr times */
                vector<double> mTimes;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:AnimChannel")
+#endif
 };
 
 
@@ -127,6 +137,11 @@ class ntlSetVec3f {
                ntlSetVec3f& operator*=( const ntlSetVec3f &v );
 
                vector<ntlVec3f> mVerts;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlSetVec3f")
+#endif
 };
 
 
@@ -163,6 +178,11 @@ class Attribute
        protected:
 
                bool initChannel(int elemSize);
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:Attribute")
+#endif
 };
 
 
@@ -195,6 +215,11 @@ class AttributeList
                bool ignoreParameter(string name, string source);
                void print();
        protected:
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:AttributeList")
+#endif
 };
 
 ntlVec3f channelFindMaxVf (AnimChannel<ntlVec3f> channel);
index 6b4b778..915ede6 100644 (file)
 
 #include "ntl_geometrymodel.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 // indicator for LBM inclusion
 //#ifndef LBMDIM
 
@@ -80,6 +84,11 @@ public:
                forceAtt = forceVel = forceMaxd = LbmVec(0.,0.,0.);
                compAvWeight=0.; compAv=LbmVec(0.);
        };
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ControlForces")
+#endif
 };
 
 
@@ -115,6 +124,11 @@ public:
 
        // init all zero / defaults
        void reset();
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ControlParticle")
+#endif
 };
 
 
@@ -128,6 +142,10 @@ public:
        // particle positions
        std::vector<ControlParticle> particles;
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ControlParticleSet")
+#endif
 };
 
 
@@ -296,6 +314,11 @@ protected:
        void initTimeArray(LbmFloat t, std::vector<ControlParticle> &parts);
 
        bool checkPointInside(ntlTree *tree, ntlVec3Gfx org, gfxReal &distance);
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ControlParticles")
+#endif
 };
 
 
index be78db9..15b9238 100644 (file)
 #include "ntl_geometryobject.h"
 #include "ntl_bsptree.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 #define ISO_STRICT_DEBUG 0
 #define ISOSTRICT_EXIT *((int *)0)=0;
 
@@ -224,6 +228,11 @@ class IsoSurface :
                vector<int> mDboundary;
                float mSCrad1, mSCrad2;
                ntlVec3Gfx mSCcenter;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:IsoSurface")
+#endif
 };
 
 
index cb51e91..56d991a 100644 (file)
 #include "ieeefp.h"
 #endif
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 // weight and triangle index
 class mvmIndexWeight {
        public:
@@ -49,6 +53,11 @@ class mvmIndexWeight {
 
                mvmFloat weight;
                int index;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:mvmIndexWeight")
+#endif
 };
 
 // transfer point with weights
@@ -58,6 +67,11 @@ class mvmTransferPoint {
                ntlVec3Gfx lastpos;
                //! triangle weights
                std::vector<mvmIndexWeight> weights;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:mvmTransferPoint")
+#endif
 };
 
 
@@ -86,6 +100,10 @@ class MeanValueMeshCoords {
     std::vector<mvmTransferPoint> mVertices;
     int mNumVerts;
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:MeanValueMeshCoords")
+#endif
 };
 
 #endif
index cd1331a..473e746 100644 (file)
 #ifndef NTL_BLENDERDUMPER_H
 #include "ntl_world.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 class ntlBlenderDumper :
        public ntlWorld
 {
@@ -27,6 +31,10 @@ public:
 
 protected:
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlBlenderDumper")
+#endif
 };
 
 #define NTL_BLENDERDUMPER_H
index 775a216..9c6bf37 100644 (file)
@@ -22,6 +22,9 @@
 
 #define BSP_STACK_SIZE 50
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
 
 //! bsp tree stack classes, defined in ntl_bsptree.cpp,
 //  detailed definition unnecesseary here
@@ -120,6 +123,10 @@ class ntlTree
                //! duplicated triangles, inited during subdivide 
                int mTriDoubles; 
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlTree")
+#endif
 };
 
 
index 5b7ff14..9d8f1ee 100644 (file)
 
 #include "attributes.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 //! geometry class type ids
 #define GEOCLASSTID_OBJECT   1
 #define GEOCLASSTID_SHADER   2
@@ -111,6 +115,10 @@ class ntlGeometryClass
 
        private:
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlGeometryClass")
+#endif
 };
 
 
index 93fe207..08d3bcb 100644 (file)
 
 #include "ntl_geometryobject.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 /*! A simple box object generatedd by 12 triangles */
 class ntlGeometryObjModel : public ntlGeometryObject
 {
@@ -89,6 +93,11 @@ class ntlGeometryObjModel : public ntlGeometryObject
 
                /*! set data file name */
                inline void setFilename(string set) { mFilename = set; }
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlGeometryObjModel")
+#endif
 };
 
 #endif
index 677f132..2c22919 100644 (file)
 #include "ntl_geometryclass.h"
 #include "ntl_lighting.h"
 #include "ntl_ray.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 class ntlRenderGlobals;
 class ntlTriangle;
 
@@ -240,6 +245,10 @@ class ntlGeometryObject : public ntlGeometryClass
 
        public:
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlGeometryObject")
+#endif
 };
 
 #endif
index f43df65..7e0d61f 100644 (file)
 #define NTL_GEOMETRYSHADER_H
 
 #include "ntl_geometryclass.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 class ntlGeometryObject;
 class ntlRenderGlobals;
 
@@ -57,6 +62,11 @@ class ntlGeometryShader :
 
                /*! surface output name for this simulation */
                string mOutFilename; 
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlGeometryShader")
+#endif
 };
 
 #endif
index 88fcaef..0cae32f 100644 (file)
 #define NTL_LIGHTING_H
 
 #include "ntl_vector3dim.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 class ntlMaterial;
 class ntlRay;
 class ntlRenderGlobals;
@@ -88,6 +93,10 @@ protected:
 
 private:
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlLightObject")
+#endif
 };
 
 
@@ -195,6 +204,10 @@ public:
        //! Set Fresnel on/off
        inline void setFresnel(int set) { mFresnel = set; }
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlMaterial")
+#endif
 };
 
 
index ab2a30b..597fcf1 100644 (file)
@@ -14,6 +14,9 @@
 
 #include "ntl_vector3dim.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
 
 // The basic vector class
 template<class Scalar>
@@ -96,6 +99,10 @@ public:
 
 protected:
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlMatrix4x4")
+#endif
 };
 
 
index 5f6d34e..6384edc 100644 (file)
 #include "ntl_geometryobject.h"
 #include "ntl_bsptree.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 class ntlTriangle;
 class ntlRay;
 class ntlTree;
@@ -39,6 +43,11 @@ class ntlIntersection {
                ntlRay *ray; 
                ntlTriangle *tri;
                char flags;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlIntersection")
+#endif
 };
 
 //! the main ray class
@@ -138,6 +147,10 @@ private:
        /*! ID of this ray (from renderglobals */
        int mID;
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlRay")
+#endif
 };
 
 
@@ -225,6 +238,10 @@ private:
        /*! ID of last ray that an intersection was calculated for */
        int mLastRay;
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlTriangle")
+#endif
 };
 
 
@@ -410,6 +427,10 @@ private:
        /*! shader/obj initializations are only done on first init */
        bool mFirstInitDone;
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlScene")
+#endif
 };
 
 
index e3e492c..38a6d2d 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 /* absolute value */
 template < class T >
 inline T
@@ -205,6 +209,11 @@ protected:
   
 private:
   Scalar value[3];  //< Storage of vector values
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlVector3Dim")
+#endif
 };
 
 
index 6cec098..30b7cbf 100644 (file)
 #include "ntl_geometryobject.h"
 #include "simulation_object.h"
 #include "elbeem.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 class ntlOpenGLRenderer;
 class ntlScene;
 class SimulationObject;
@@ -119,6 +124,11 @@ class ntlWorld
                /*! count no. of frame for correct sim time */
                int mSimFrameCnt;
                vector<int> mSimFrameValue;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlWorld")
+#endif
 };
 
 
@@ -389,6 +399,11 @@ private:
        bool mSingleFrameMode;
        //! filename for single frame mode
        string mSingleFrameFilename;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ntlRenderGlobals")
+#endif
 };
 
 
index f3ea318..2d96b5b 100644 (file)
 #include "utilities.h"
 #include "attributes.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 /* parametrizer accuracy */
 typedef double ParamFloat;
 typedef ntlVec3d ParamVec;
@@ -306,6 +310,11 @@ class Parametrizer {
 
                /*! pointer to the attribute list */
                AttributeList *mpAttrs;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:Parametrizer")
+#endif
 };
 
 
index d6bc450..593b582 100644 (file)
@@ -53,6 +53,7 @@ ParticleTracer::ParticleTracer() :
 
 ParticleTracer::~ParticleTracer() {
        debMsgStd("ParticleTracer::~ParticleTracer",DM_MSG,"destroyed",10);
+       if(mpTrafo) delete mpTrafo;
 }
 
 /*****************************************************************************/
index 5d32890..c14c8e2 100644 (file)
 #ifndef NTL_PARTICLETRACER_H
 
 #include "ntl_geometryobject.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 template<class Scalar> class ntlMatrix4x4;
 
 // particle types
@@ -131,6 +136,11 @@ class ParticleObject
 
                /* for list constructions */
                ParticleObject *mpNext;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ParticleObject")
+#endif
 };
 
 
@@ -274,6 +284,11 @@ class ParticleTracer :
                /* prev pos save interval */
                float mTrailTimeLast, mTrailInterval;
                int mTrailLength;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:ParticleTracer")
+#endif
 };
 
 #define NTL_PARTICLETRACER_H
index 76684fa..4a89d15 100644 (file)
 #include "ntl_geometryshader.h"
 #include "parametrizer.h"
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 class LbmSolverInterface;
 class CellIdentifierInterface;
 class ntlTree;
@@ -188,6 +192,11 @@ class SimulationObject :
                virtual inline ntlVec3Gfx *getBBStart()         { return &mGeoStart; }
                virtual inline ntlVec3Gfx *getBBEnd()           { return &mGeoEnd; }
 
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:SimulationObject")
+#endif
 };
 
 
index 1962e80..593fea1 100644 (file)
 #include "ntl_ray.h"
 #include <stdio.h>
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 #if PARALLEL==1
 #include <omp.h>
 #endif // PARALLEL=1
@@ -145,6 +149,11 @@ class UniformFsgrCellIdentifier :
                        if( x==cid->x && y==cid->y && z==cid->z && level==cid->level ) return true;
                        return false;
                }
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:UniformFsgrCellIdentifier")
+#endif
 };
 
 //! information needed for each level in the simulation
@@ -193,6 +202,10 @@ public:
        int lSizex, lSizey, lSizez;
        int lOffsx, lOffsy, lOffsz;
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:FsgrLevelData")
+#endif
 };
 
 
@@ -740,6 +753,11 @@ class LbmFsgrSolver :
                static LbmFloat lesCoeffOffdiag[ 2 ][ 9 ];
 
 #              endif  // LBMDIM==2
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmFsgrSolver")
+#endif
 };
 
 #undef STCON
index 7513480..c3015b8 100644 (file)
@@ -225,7 +225,10 @@ LbmFsgrSolver::initCpdata()
        
        // manually switch on! if this is zero, nothing is done...
        mpControl->mSetForceStrength = this->mTForceStrength = 1.;
-       mpControl->mCons.clear();
+       while (!mpControl->mCons.empty()) {
+               delete mpControl->mCons.back();  mpControl->mCons.pop_back();
+       }
+
        
        // init all control fluid objects
        int numobjs = (int)(mpGiObjects->size());
@@ -264,7 +267,9 @@ LbmFsgrSolver::initCpdata()
        if(0) {
                // manually switch on! if this is zero, nothing is done...
                mpControl->mSetForceStrength = this->mTForceStrength = 1.;
-               mpControl->mCons.clear();
+               while (!mpControl->mCons.empty()) {
+                       delete mpControl->mCons.back();  mpControl->mCons.pop_back();
+               }
 
                // add new set
                LbmControlSet *cset;
index afbe539..d20823d 100644 (file)
 #ifndef LBM_TESTCLASS_H
 #define LBM_TESTCLASS_H
 
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 //class IsoSurface;
 class ParticleObject;
 class ControlParticles;
@@ -147,6 +151,11 @@ class LbmControlSet {
 
                AnimChannel<ntlVec3f> mcCpScale;
                AnimChannel<ntlVec3f> mcCpOffset;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmControlSet")
+#endif
 };
                
 
@@ -180,6 +189,11 @@ class LbmControlData
 
                // cp debug displau
                LbmFloat mDebugCpscale, mDebugVelScale, mDebugCompavScale, mDebugAttScale, mDebugMaxdScale, mDebugAvgVelScale;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmControlData ")
+#endif
 };
 
 #endif // LBM_TESTCLASS_H
index e25c59e..e4720df 100644 (file)
 #include "parametrizer.h"
 #include "attributes.h"
 #include "isosurface.h"
+
+#ifdef WITH_CXX_GUARDEDALLOC
+#  include "MEM_guardedalloc.h"
+#endif
+
 class ParticleTracer;
 class ParticleObject;
 
@@ -171,6 +176,11 @@ class LbmCellContents {
                CellFlagType flag;
                BubbleId     bubble;
        LbmFloat     ffrac;
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmCellContents")
+#endif
 };
 
 /* struct for the coordinates of a cell in the grid */
@@ -224,6 +234,10 @@ class CellIdentifierInterface {
                //! has the grid been traversed?
                bool mEnd;
 
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:CellIdentifierInterface")
+#endif
 };
 
 
@@ -601,6 +615,11 @@ class LbmSolverInterface
 #if PARALLEL==1
                int mNumOMPThreads;
 #endif  // PARALLEL==1
+
+private:
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("ELBEEM:LbmSolverInterface")
+#endif
 };