optionally use guarded alloc for tiles compositor, also replace allocation functions...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jun 2012 09:14:37 +0000 (09:14 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jun 2012 09:14:37 +0000 (09:14 +0000)
144 files changed:
intern/ghost/GHOST_IEvent.h
intern/ghost/GHOST_IEventConsumer.h
intern/ghost/GHOST_IWindow.h
intern/ghost/GHOST_Rect.h
intern/ghost/intern/GHOST_WindowManager.h
intern/guardedalloc/MEM_guardedalloc.h
intern/string/STR_String.h
source/blender/compositor/intern/COM_Converter.h
source/blender/compositor/intern/COM_Device.h
source/blender/compositor/intern/COM_ExecutionGroup.h
source/blender/compositor/intern/COM_ExecutionSystem.h
source/blender/compositor/intern/COM_ExecutionSystemHelper.h
source/blender/compositor/intern/COM_MemoryBuffer.h
source/blender/compositor/intern/COM_MemoryProxy.h
source/blender/compositor/intern/COM_NodeBase.h
source/blender/compositor/intern/COM_Socket.h
source/blender/compositor/intern/COM_SocketConnection.h
source/blender/compositor/intern/COM_SocketReader.h
source/blender/compositor/intern/COM_WorkPackage.h
source/blender/compositor/intern/COM_WorkScheduler.h
source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h
source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.h
source/gameengine/BlenderRoutines/KX_BlenderMouseDevice.h
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h
source/gameengine/BlenderRoutines/KX_BlenderSystem.h
source/gameengine/Converter/BL_DeformableGameObject.h
source/gameengine/Converter/BL_MeshDeformer.h
source/gameengine/Converter/BL_ModifierDeformer.h
source/gameengine/Converter/BL_ShapeDeformer.h
source/gameengine/Converter/BL_SkinDeformer.h
source/gameengine/Converter/BlenderWorldInfo.h
source/gameengine/Converter/KX_BlenderScalarInterpolator.h
source/gameengine/Converter/KX_BlenderSceneConverter.h
source/gameengine/Converter/KX_SoftBodyDeformer.h
source/gameengine/Expressions/BoolValue.h
source/gameengine/Expressions/ConstExpr.h
source/gameengine/Expressions/EmptyValue.h
source/gameengine/Expressions/ErrorValue.h
source/gameengine/Expressions/Expression.h
source/gameengine/Expressions/FloatValue.h
source/gameengine/Expressions/IdentifierExpr.h
source/gameengine/Expressions/IfExpr.h
source/gameengine/Expressions/InputParser.h
source/gameengine/Expressions/IntValue.h
source/gameengine/Expressions/KX_HashedPtr.h
source/gameengine/Expressions/Operator1Expr.h
source/gameengine/Expressions/Operator2Expr.h
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Expressions/StringValue.h
source/gameengine/Expressions/Value.h
source/gameengine/Expressions/VectorValue.h
source/gameengine/Expressions/VoidValue.h
source/gameengine/GameLogic/SCA_ActuatorEventManager.h
source/gameengine/GameLogic/SCA_AlwaysEventManager.h
source/gameengine/GameLogic/SCA_BasicEventManager.h
source/gameengine/GameLogic/SCA_EventManager.h
source/gameengine/GameLogic/SCA_ExpressionController.h
source/gameengine/GameLogic/SCA_IActuator.h
source/gameengine/GameLogic/SCA_IInputDevice.h
source/gameengine/GameLogic/SCA_IScene.h
source/gameengine/GameLogic/SCA_JoystickManager.h
source/gameengine/GameLogic/SCA_KeyboardManager.h
source/gameengine/GameLogic/SCA_LogicManager.h
source/gameengine/GameLogic/SCA_MouseManager.h
source/gameengine/GameLogic/SCA_PropertyEventManager.h
source/gameengine/GameLogic/SCA_RandomEventManager.h
source/gameengine/GameLogic/SCA_RandomNumberGenerator.h
source/gameengine/GameLogic/SCA_TimeEventManager.h
source/gameengine/Ketsji/BL_Action.h
source/gameengine/Ketsji/BL_ActionManager.h
source/gameengine/Ketsji/BL_BlenderShader.h
source/gameengine/Ketsji/BL_Material.h
source/gameengine/Ketsji/BL_Shader.h
source/gameengine/Ketsji/BL_Texture.h
source/gameengine/Ketsji/KX_BulletPhysicsController.h
source/gameengine/Ketsji/KX_CameraIpoSGController.h
source/gameengine/Ketsji/KX_ClientObjectInfo.h
source/gameengine/Ketsji/KX_Dome.h
source/gameengine/Ketsji/KX_EmptyObject.h
source/gameengine/Ketsji/KX_FontObject.h
source/gameengine/Ketsji/KX_IInterpolator.h
source/gameengine/Ketsji/KX_IPO_SGController.h
source/gameengine/Ketsji/KX_IPhysicsController.h
source/gameengine/Ketsji/KX_IScalarInterpolator.h
source/gameengine/Ketsji/KX_ISceneConverter.h
source/gameengine/Ketsji/KX_ISystem.h
source/gameengine/Ketsji/KX_KetsjiEngine.h
source/gameengine/Ketsji/KX_LightIpoSGController.h
source/gameengine/Ketsji/KX_MaterialIpoController.h
source/gameengine/Ketsji/KX_MotionState.h
source/gameengine/Ketsji/KX_ObColorIpoSGController.h
source/gameengine/Ketsji/KX_OrientationInterpolator.h
source/gameengine/Ketsji/KX_PositionInterpolator.h
source/gameengine/Ketsji/KX_RayCast.h
source/gameengine/Ketsji/KX_RayEventManager.h
source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.h
source/gameengine/Ketsji/KX_SG_NodeRelationships.h
source/gameengine/Ketsji/KX_ScalarInterpolator.h
source/gameengine/Ketsji/KX_ScalingInterpolator.h
source/gameengine/Ketsji/KX_TimeCategoryLogger.h
source/gameengine/Ketsji/KX_TimeLogger.h
source/gameengine/Ketsji/KX_TouchEventManager.h
source/gameengine/Ketsji/KX_WorldInfo.h
source/gameengine/Ketsji/KX_WorldIpoController.h
source/gameengine/Network/NG_NetworkDeviceInterface.h
source/gameengine/Network/NG_NetworkMessage.h
source/gameengine/Network/NG_NetworkObject.h
source/gameengine/Network/NG_NetworkScene.h
source/gameengine/Physics/Bullet/CcdGraphicController.h
source/gameengine/Physics/Bullet/CcdPhysicsController.h
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_IController.h
source/gameengine/Physics/common/PHY_IGraphicController.h
source/gameengine/Physics/common/PHY_IMotionState.h
source/gameengine/Physics/common/PHY_IPhysicsController.h
source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_IVehicle.h
source/gameengine/Rasterizer/RAS_2DFilterManager.h
source/gameengine/Rasterizer/RAS_BucketManager.h
source/gameengine/Rasterizer/RAS_Deformer.h
source/gameengine/Rasterizer/RAS_FramingManager.h
source/gameengine/Rasterizer/RAS_ICanvas.h
source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
source/gameengine/Rasterizer/RAS_IRasterizer.h
source/gameengine/Rasterizer/RAS_IRenderTools.h
source/gameengine/Rasterizer/RAS_MaterialBucket.h
source/gameengine/Rasterizer/RAS_MeshObject.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h
source/gameengine/Rasterizer/RAS_Polygon.h
source/gameengine/Rasterizer/RAS_Rect.h
source/gameengine/Rasterizer/RAS_TexVert.h
source/gameengine/SceneGraph/SG_BBox.h
source/gameengine/SceneGraph/SG_Controller.h
source/gameengine/SceneGraph/SG_DList.h
source/gameengine/SceneGraph/SG_IObject.h
source/gameengine/SceneGraph/SG_Node.h
source/gameengine/SceneGraph/SG_ParentRelation.h
source/gameengine/SceneGraph/SG_QList.h
source/gameengine/SceneGraph/SG_Spatial.h
source/gameengine/SceneGraph/SG_Tree.h

index 3c3111a2e6d4c67df4e942692905f6c2ac7a7d04..ef63c57caa541b11fdf68c4d1303e9513472a7f3 100644 (file)
@@ -86,13 +86,7 @@ public:
        virtual GHOST_TEventDataPtr getData() = 0;
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) {
-               return MEM_mallocN(num_bytes, "GHOST:GHOST_IEvent");
-       }
-       void operator delete(void *mem) {
-               MEM_freeN(mem);
-       }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEvent")
 #endif
 };
 
index d437f219f8dc0b580c2b311991d15012b00e3197..cfc4fae7978416cc7caea9e5b7f4be24a4424ce4 100644 (file)
@@ -64,9 +64,7 @@ public:
        virtual bool processEvent(GHOST_IEvent *event) = 0;
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_IEventConsumer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEventConsumer")
 #endif
 };
 
index e754883504dfb12c097482dfb81f4f68a752f0c8..69aaeeb4b2e1c5382c2ff8d47c328f83cbbb37da 100644 (file)
@@ -306,9 +306,7 @@ public:
        virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds) { return GHOST_kSuccess; }
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_IWindow"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IWindow")
 #endif
 };
 
index 90678c6dfa23c8ec12ac20cc927388c27db70bf3..745e402cdc8b04441616317fad8f9964c2daada5 100644 (file)
@@ -190,9 +190,7 @@ public:
        GHOST_TInt32 m_b;
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_Rect"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_Rect")
 #endif
 };
 
index 47931347ed6026669ce058dbfe862a94f8c81def..e754595e8819453beded47121dcd3993571f4e8f 100644 (file)
@@ -162,9 +162,7 @@ protected:
        GHOST_IWindow *m_activeWindowBeforeFullScreen;
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_WindowManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_WindowManager")
 #endif
        
 };
index 83d6549218aadc09a2440672808142f2bb8d2bc1..bb4c372e46ddb149e58762e4c8ef038be315f305 100644 (file)
@@ -167,7 +167,27 @@ extern "C" {
 #ifndef NDEBUG
 const char *MEM_name_ptr(void *vmemh);
 #endif
-       
+
+#ifdef __cplusplus
+/* alloc funcs for C++ only */
+#define MEM_CXX_CLASS_ALLOC_FUNCS(_id)                                        \
+public:                                                                       \
+       void *operator new(size_t num_bytes) {                                    \
+               return MEM_mallocN(num_bytes, _id);                                   \
+       }                                                                         \
+       void operator delete(void *mem) {                                         \
+               MEM_freeN(mem);                                                       \
+       }                                                                         \
+       void *operator new[](size_t num_bytes) {                                  \
+               return MEM_mallocN(num_bytes, _id "[]");                              \
+       }                                                                         \
+       void operator delete[](void *mem) {                                       \
+               MEM_freeN(mem);                                                       \
+       }                                                                         \
+
+#endif
+
+
 #ifdef __cplusplus
 }
 #endif
index 2f17b059c8ff2e609926854feb2996be432a7171..ac8b855bbe99fee75f9d8edb0fa916be4f09d62d 100644 (file)
@@ -204,9 +204,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "CXX:STR_String"); }
-       void operator delete(void *mem) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("CXX:STR_String")
 #endif
 };
 
index d01556cc79c720bfd839a402a1f72cb22a186232..d129898ab3fddc15ab2c2635f7ade9b8411c2819 100644 (file)
@@ -66,5 +66,9 @@ public:
         * @see SocketConnection - a link between two sockets
         */
        static void convertResolution(SocketConnection *connection, ExecutionSystem *system);
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:Converter")
+#endif
 };
 #endif
index 2a86382a191a33e3a29ae6a9cd74ba042f79b9b5..e33a2a4288fdde0969a0e9e803e2434726c2e757 100644 (file)
@@ -48,6 +48,9 @@ public:
         */
        virtual void execute(WorkPackage *work) = 0;
 
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:Device")
+#endif
 };
 
 #endif
index 541b3e4866d1fb59f41883341f1dcd3b2f27e5a3..53c2e890bea17951686acdc7a9b42ce39a96c348 100644 (file)
@@ -394,7 +394,10 @@ public:
         * @see ExecutionSystem.execute
         */
        CompositorPriority getRenderPriotrity();
-       
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionGroup")
+#endif
 };
 
 #endif
index 48ff2ef6af95624104864e6c73a8e5d078ef87ac..293a35b3518fa7fcab442dc24c8bc6136125d95c 100644 (file)
@@ -232,5 +232,9 @@ private:
        
        void executeGroups(CompositorPriority priority);
 
-};
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionSystem")
 #endif
+};
+
+#endif /* _COM_ExecutionSystem_h */
index 8dbd308153bce058faeb49592699431ec4c3dc92..31ff97614daf6d2eeea3a9346d765aff9f8fef18 100644 (file)
@@ -123,5 +123,10 @@ public:
         * @param system the execution system to dump
         */
        static void debugDump(ExecutionSystem *system);
-};
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionSystemHelper")
 #endif
+};
+
+#endif /* _COM_ExecutionSystemHelper_h */
index dd24a30e85edaa6a9e3991629f77dfbe811420b2..63d9d54bcee8ee2351767c2e396c79e14d582422 100644 (file)
@@ -166,6 +166,10 @@ public:
        float *convertToValueBuffer();
 private:
        unsigned int determineBufferSize();
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:MemoryBuffer")
+#endif
 };
 
 #endif
index e7e7f1cf3a017a95e926921c56376d95c56e9422..8ac817ffe7bdf85fffa1bef55d09e29abcc0055a 100644 (file)
@@ -102,6 +102,10 @@ public:
         * @brief get the allocated memory
         */
        inline MemoryBuffer *getBuffer() { return this->buffer; }
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:MemoryProxy")
+#endif
 };
 
 #endif
index 54f80926b84274dc42d4362145080fe5066c0f54..fc9f79d26869dd2ae3870a0e769deaa86438c535 100644 (file)
@@ -141,6 +141,11 @@ protected:
         */
        void addOutputSocket(DataType datatype);
        void addOutputSocket(DataType datatype, bNodeSocket *socket);
+
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeBase")
+#endif
 };
 
 #endif
index 7c5c2198a1666922c658352a25d8ba64234a10fc..4f82a490e1473b17307fdc5ea6c830a2c8e00de2 100644 (file)
@@ -74,6 +74,9 @@ public:
        void setEditorSocket(bNodeSocket *editorSocket) { this->editorSocket = editorSocket; }
        bNodeSocket *getbNodeSocket() const { return this->editorSocket; }
        
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:Socket")
+#endif
 };
 
 
index 5385c5be49b97fb962055bcb6c3ae5fe76eedd7f..101e06af61cd143879dc616bc7eecf3c50127905 100644 (file)
@@ -118,6 +118,10 @@ public:
         * @return needs conversion [true:false]
         */
        bool needsResolutionConversion() const;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:SocketConnection")
+#endif
 };
 
 #endif
index 3eb39e4bf02403e606cc57db09771075400505c3..f4f58e6e00769a86ef3acf5b86780a62573eef19 100644 (file)
@@ -106,6 +106,10 @@ public:
 
        inline const unsigned int getWidth() const { return this->width; }
        inline const unsigned int getHeight() const { return this->height; }
-};
 
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:SocketReader")
 #endif
+};
+
+#endif /* _COM_SocketReader_h */
index fed87186d2022db137f34d6fd2a276c6e04f68e1..6ee9d616a34f8191d9f6f0966beb8f39cad3faee 100644 (file)
@@ -59,6 +59,10 @@ public:
         * @brief get the number of the chunk
         */
        unsigned int getChunkNumber() const { return this->chunkNumber; }
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage")
+#endif
 };
 
 #endif
index e52e0295607328d20d795989e5e0d56d3f87fa95..f56fe94201e5d2365a9ac1aa65630cc7ea120575 100644 (file)
@@ -110,5 +110,10 @@ public:
         * @see CompositorContext.getHasActiveOpenCLDevices
         */
        static bool hasGPUDevices();
-};
+
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkScheduler")
 #endif
+};
+
+#endif /* _COM_WorkScheduler_h_ */
index a9a12f5a9e0cb8b22ef5277fcab07215f3ec6525..ee7997abb3909f8bbfcf1de1d9cb3ae77630ba4e 100644 (file)
@@ -194,9 +194,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BlenderCanvas"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BlenderCanvas")
 #endif
 };
 
index 18f163d727459c5a7a5c1f5db1539787f0885ec0..43870d9030d5c3eb1648844722afcf635d49e9bd 100644 (file)
@@ -72,9 +72,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_BlenderInputDevice"); }
-       void operator delete(void *mem) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_BlenderInputDevice")
 #endif
 };
 #endif //__KX_BLENDERINPUTDEVICE_H__
index 43296fc97605ad59b88cde3b72d4864d01c1f5a0..e9140efce011e27b1ec50624823a62531037fc82 100644 (file)
@@ -55,9 +55,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BlenderKeyboardDevice"); }
-       void operator delete(void *mem) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BlenderKeyboardDevice")
 #endif
 };
 
index 1c54b2fc00061ca473968e191a24a7298e397841..0571cafd7a15dc14b30f28a2d04484225cd0671d 100644 (file)
@@ -51,9 +51,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BlenderMouseDevice"); }
-       void operator delete(void *mem) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BlenderMouseDevice")
 #endif
 };
 
index a470e029758891b4c18c82f2a8ea82748b0fac37..a229c9f34e68e3ba2fed5a062a1791c761a7cb6a 100644 (file)
@@ -108,9 +108,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BlenderRenderTools"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BlenderRenderTools")
 #endif
 };
 
index 2674c9a7aa1345d42239a989cfcf5420eb0448f7..a8e033ed47bec1dfa5de2f30a5478cbb81c3541b 100644 (file)
@@ -49,9 +49,7 @@ public:
        virtual double GetTimeInSeconds();
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BlenderSystem"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BlenderSystem")
 #endif
 };
 
index d0fe741672deb6c4441ba113d6f6e83b05cd03dd..61477fb1caca84443ca5c8e50c5cde0fc8a561ce 100644 (file)
@@ -100,9 +100,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_DeformableGameObject"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_DeformableGameObject")
 #endif
 };
 
index b7d527d83eb45c3213e9ca10101e29bd08c6f717..c73e4efd2455947164a135100d5384306971c972 100644 (file)
@@ -90,9 +90,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_MeshDeformer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_MeshDeformer")
 #endif
 };
 
index 163b2dd108f4fc141bc9174e5388fdd19e1a5d9a..b4827b1bee4980499f2f29dde5fdc36d35b5f81b 100644 (file)
@@ -107,9 +107,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_ModifierDeformer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_ModifierDeformer")
 #endif
 };
 
index 6b55d5b26f94c454003f45d4e0cfc5e2f6db76f9..efc1b54666649a21df233dbbb511930239c35301 100644 (file)
@@ -79,9 +79,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_ShapeDeformer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_ShapeDeformer")
 #endif
 };
 
index 8e3d58515735ee634d9259d8386baaeb5cac6310..48c3c3e6186cc90c4f42bafc9d110346e6024f9f 100644 (file)
@@ -116,9 +116,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_SkinDeformer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_SkinDeformer")
 #endif
 };
 
index e6f274b777e2a9ed6f99510644894a59232f30fa..e00eb99e73fbbf4d3d9c51cda63360a07db0ec34 100644 (file)
@@ -100,9 +100,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BlenderWorldInfo"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BlenderWorldInfo")
 #endif
 };
 
index cd18bd8c1d6be9f00bf521905cccfa7b5f259782..bc5a6eeef856b3037c51ad69ccd7040b0a4bba01 100644 (file)
@@ -55,9 +55,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_ScalarInterpolator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_ScalarInterpolator")
 #endif
 };
 
@@ -71,9 +69,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_InterpolatorList"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_InterpolatorList")
 #endif
 };
 
index 258fb1ebdccc9e9405fa132deb4e435da89fc4f4..906e3fed111b7435bc8c48084d33bc028e974bb8 100644 (file)
@@ -191,9 +191,7 @@ public:
 #endif
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BlenderSceneConverter"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BlenderSceneConverter")
 #endif
 };
 
index 5235c91ce891b5529dd36c3888252007959e167c..d692d45eb18e8f9405f4280934fd843813c0951b 100644 (file)
@@ -93,9 +93,7 @@ protected:
        //class RAS_MeshObject  *m_pMesh;
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_ShapeDeformer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_ShapeDeformer")
 #endif
 };
 
index 48238264f1b6f4719b6aaa58f7118e0df2d48142..09e931ea6613992f50b31e91ffde1b655ecff73c 100644 (file)
@@ -56,11 +56,8 @@ public:
 private:
        bool                            m_bool;
 
-
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CBoolValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CBoolValue")
 #endif
 };
 
index 30b830cb92c43a7a11cc5408a44aa17e8ff2daaf..86d411cef26c0c38803e77715194ac4944dfe2b5 100644 (file)
@@ -47,9 +47,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CConstExpr"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CConstExpr")
 #endif
 };
 
index 73946da6705cf190a4cca79270120e5dcdf49d92..54920359f3f9b86f8308ff696b9d4a5c526674f8 100644 (file)
@@ -41,9 +41,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CEmptyValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CEmptyValue")
 #endif
 };
 
index 484d135f40633056dfc02ebfa014e7dd499acd56..12bc7c7ffcb928c594e6efc3e3fae8f5ffe6f77b 100644 (file)
@@ -39,9 +39,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CErrorValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CErrorValue")
 #endif
 };
 
index 8a4ba8bb7e2f425f268c56ee69b5f668efa4789a..5f5db5053310145f8c9c2a730d87e6fde9a1171d 100644 (file)
@@ -74,9 +74,7 @@ class CBrokenLinkInfo
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CBrokenLinkInfo"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CBrokenLinkInfo")
 #endif
 };
 
@@ -144,9 +142,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CExpression"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CExpression")
 #endif
 };
 
index 75b2202eb7efe3b0afa4f2f649041341d635e67a..59311e5d3738366b5900d3fd7143c09a6a188ce3 100644 (file)
@@ -50,9 +50,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CFloatValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CFloatValue")
 #endif
 };
 
index 632a1e0a6d9c8db66c19b87ee36d701e2def3cd3..58e75c4b02e9c28fa500de692f73ccb9d24076dd 100644 (file)
@@ -52,9 +52,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CIdentifierExpr"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CIdentifierExpr")
 #endif
 };
 
index c0caa7f3e173cefb41281560975ec76f972deeae..f8ed81168d02ddbc194409673e6ea9c2bb1829ef 100644 (file)
@@ -51,9 +51,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CIfExpr"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CIfExpr")
 #endif
 };
 
index 085e6870429225165a6bb10c295b9b82da935fd6..6dfeff551052bbbff3b09ec926dd15160ce4e4e0 100644 (file)
@@ -110,9 +110,7 @@ private:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CParser"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CParser")
 #endif
 };
 
index 733ee8bfa4e16079130eab073ee9230359cdf6b9..e728467cc4e37d81c4d1675a35a8a008f51d0a30 100644 (file)
@@ -65,9 +65,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CIntValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CIntValue")
 #endif
 };
 
index edb68f2861d64f17cb1ed94dfc0752515b0bb1d5..ffc6ff647d529ecdf4637059ca45d1d0b0341552 100644 (file)
@@ -54,9 +54,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CHashedPtr"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CHashedPtr")
 #endif
 };
 
index 9815ce16e9549f721ca490cf87436b2570533e9f..13a1b16500a08a8c2497d29e3b260b009e5a79ca 100644 (file)
@@ -52,9 +52,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:COperator1Expr"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:")
 #endif
 };
 
index 8b1c5523a2f6ad8c7cd49ac3660f2e9a03b599f9..23272930131269218c38a2fe275b85695f0ce86b 100644 (file)
@@ -58,9 +58,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:COperator2Expr"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:COperator2Expr")
 #endif
 };
 
index 124a8e28f57195c2280ccefd9cc532d6104a7e43..af8acaa993f04c93a3309b3f8d6bc65a26ae6d1d 100644 (file)
@@ -534,21 +534,11 @@ typedef PyTypeObject *PyParentObject;  /* Define the PyParent Object */
 #ifdef WITH_CXX_GUARDEDALLOC
 #define Py_Header                                                             \
 public:                                                                       \
-       void *operator new(size_t num_bytes) {                                    \
-               return MEM_mallocN(num_bytes, "GE:PyObjectPlus");                     \
-       }                                                                         \
-       void operator delete( void *mem ) {                                       \
-               MEM_freeN(mem);                                                       \
-       }                                                                         \
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PyObjectPlus")                              \
+
 
 #define Py_HeaderPtr                                                          \
-public:                                                                       \
-       void *operator new(size_t num_bytes) {                                    \
-               return MEM_mallocN(num_bytes, "GE:PyObjectPlusPtr");                  \
-       }                                                                         \
-       void operator delete( void *mem ) {                                       \
-       MEM_freeN(mem);                                                           \
-       }                                                                         \
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PyObjectPlusPtr")                           \
 
 #else // WITH_CXX_GUARDEDALLOC
 
index 931858b7eed4d6f90515089d8c1a40e9a222c507..aa4a1a0bb00f9ed57fba38df0d8fdbb607a19272 100644 (file)
@@ -53,9 +53,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CStringValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CStringValue")
 #endif
 };
 
index 261f5244f21f42c398cd566e017acf40d1dba744..e3b52e80ba61cd00247a5aa2464f7bc02ac4e8b0 100644 (file)
@@ -164,9 +164,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CAction"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CAction")
 #endif
 };
 
@@ -436,11 +434,8 @@ public:
 protected:
        STR_String                                      m_strNewName;                               // Identification
 
-
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CPropValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CPropValue")
 #endif
 };
 
index 5d0e0c0ddb28e6dcfc25e3d65fc5030c02937db5..b7afa61d4ddb462fb04773ad238325a27b6e8fc2 100644 (file)
@@ -86,9 +86,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CVectorValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CVectorValue")
 #endif
 };
 
index 8e2545b309d92c2ce6d3920661b64ae79a6be1a1..5599b226a601b85be5fdec60dc11ed0b2d868025 100644 (file)
@@ -66,9 +66,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CVoidValue"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CVoidValue")
 #endif
 };
 
index b91e6f872a202d6cf149bf6da85ea3efdc6c3e75..dee9ea4e8ba06a41ff4dd8c178f3ec234b9068f6 100644 (file)
@@ -49,9 +49,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_ActuatorEventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_ActuatorEventManager")
 #endif
 };
 
index 21ac55d36a4efbdb5a7442e308292dad820a7a88..cf4063fba1ffb95ed6d95ded945f05d4472185b7 100644 (file)
@@ -43,9 +43,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_AlwaysEventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_AlwaysEventManager")
 #endif
 };
 
index 9d08a7785e24969b0317bf7a000604a25911c4ae..24206e46a61750200a5873eb77146084b87e884f 100644 (file)
@@ -50,9 +50,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_BasicEventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_BasicEventManager")
 #endif
 };
 
index 933fdc5190ac2e478024365edfad85afdfdd535e..83322fe82432bffc0975cef3f1491a472f964dc2 100644 (file)
@@ -84,9 +84,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_EventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_EventManager")
 #endif
 };
 
index 47401ea58076163a2cc3e52bf30de354ee203ee6..06edc83ab96cc4df472b7996ef93c50ddeba8733 100644 (file)
@@ -59,9 +59,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_ExpressionController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_ExpressionController")
 #endif
 };
 
index 211a25b84c88db049579404115c6f10195e970ce..801483bb88224606f23e2c620346101060e9f3d4 100644 (file)
@@ -160,9 +160,7 @@ public:
        bool IsType(KX_ACTUATOR_TYPE type) { return m_type == type; }
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_IActuator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_IActuator")
 #endif
 };
 
index 443faef6338a96ac28596982e31df7fbb031b68d..01f525f8eb7b95ad809aa0b627e4152df89a0abd 100644 (file)
@@ -316,9 +316,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_InputEvent"); }
-       void operator delete(void *mem) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_InputEvent")
 #endif
 };
 
index e7806ea0746604919e1d5b8bcf08fa749ff4ba5f..a399e313082b4f0d08a58feadbb3a51a8ca98e12 100644 (file)
@@ -74,9 +74,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_IScene"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_IScene")
 #endif
 };
 
index dcdd667cb1a300c07c65064bde6b10cf4f601c6d..60dcaea4ef234c64068ba137d8a3d4feade4d9f0 100644 (file)
@@ -51,9 +51,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_JoystickManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_JoystickManager")
 #endif
 };
 
index 5706d16ae195bdf62bc7b456abe24d0c517ef433..2d9ad45833fc8048eee88dd2f68b2da7180844b2 100644 (file)
@@ -59,9 +59,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_KeyboardManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_KeyboardManager")
 #endif
 };
 
index 751c03bc712b183299a09b277a99be0f5742de8f..817f3a1c22ac179597dfbe34c7d3cf9f15c65c67 100644 (file)
@@ -147,9 +147,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_LogicManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_LogicManager")
 #endif
 };
 
index 4b40ab8a197ebab8949bf90f42a5331c0c55136d..60edb2816cbc36b4df3dace0191de274e1d36d6e 100644 (file)
@@ -68,9 +68,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_MouseManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_MouseManager")
 #endif
 };
 
index 7d5e13f0ae1664fadb487b3f2a32dbb545b41969..7a4ec75048405333cb337e2ec699ae67d97e8d1f 100644 (file)
@@ -48,9 +48,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_PropertyEventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_PropertyEventManager")
 #endif
 };
 
index 7205363a3eec0e1542b453581a598eafd81c15fd..b46899b135560cfb7ff9f9bbfc9b621ce86d530f 100644 (file)
@@ -47,9 +47,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_RandomEventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_RandomEventManager")
 #endif
 };
 
index 8f546b37ec8db01e3b8f7416ad10769cd9d28c73..10818cb4e8f1c3d7e4b324f74760efcc5752c26a 100644 (file)
@@ -77,9 +77,7 @@ class SCA_RandomNumberGenerator {
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_RandomNumberGenerator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_RandomNumberGenerator")
 #endif
 };
 
index 7c813785b9cb7a3858ef96203cf48392d2bfba53..092cf016370d65769ad24bccca0f3da5db97a91d 100644 (file)
@@ -55,9 +55,7 @@ public:
        vector<CValue*> GetTimeValues();
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_TimeEventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SCA_TimeEventManager")
 #endif
 };
 
index e5e325a2ba023a5b049be89edffc328d515bf2da..ab2adf7fe34297d0ff018a2f0548361e09d45189 100644 (file)
@@ -132,9 +132,7 @@ public:
        };
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_Action"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_Action")
 #endif
 };
 
index d4351e3c70488b1612fd5ab3abdd8b9f29e93b30..dbdaa6652ad87d439ca7711b51930970519925a4 100644 (file)
@@ -94,9 +94,7 @@ public:
        void Update(float);
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_ActionManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_ActionManager")
 #endif
 };
 
index d309b1236fcb3a29f4adcec9f80e24965dd72d0d..f23dbfdf3a55367a0b2065b58fa55bfc0b283df1 100644 (file)
@@ -97,9 +97,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_BlenderShader"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_BlenderShader")
 #endif
 };
 
index 70fd640a07e06a360c80b5933ced451a54e578fe..b67bd95f878b6af5f229f5f86b4f8e1fee3fdc4f 100644 (file)
@@ -110,9 +110,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_Material"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_Material")
 #endif
 };
 
index 4722136581695a81022a9ba5714a2ad6e20529d0..2bb094f12ee36cce96d4f9aa1f18d217d22dffa3 100644 (file)
@@ -32,9 +32,7 @@ public:
        int                             mLoc;           // Sampler location
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_Sampler"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_Sampler")
 #endif
 };
 
@@ -79,9 +77,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_Uniform"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_Uniform")
 #endif
 };
 
@@ -104,9 +100,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_DefUniform"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_DefUniform")
 #endif
 };
 
index 3c60cad4fbf105b44d8dd5682e0b006ada55694c..2673be2bc424d9b3015841182dc9a00c50c53ae8 100644 (file)
@@ -74,9 +74,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_Texture"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:BL_Texture")
 #endif
 };
 
index 5fcd591d822efcab57e0b0ea24f1264dee4dc37a..71e806686ca36382793ad34ead90c71171bcb287 100644 (file)
@@ -92,9 +92,7 @@ public:
 
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BulletPhysicsController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BulletPhysicsController")
 #endif
 };
 
index f24d094229053148999da9483c5143c986d0f81b..0605876033260264bf1867f65280857fd360ff1b 100644 (file)
@@ -90,9 +90,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_CameraIpoSGController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_CameraIpoSGController")
 #endif
 };
 
index 1a94c39441fc19608e6f0161e23f65db50aa6589..6fd1271160a5df48c9f1543dff5bb92542890edd 100644 (file)
@@ -80,9 +80,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_ClientObjectInfo"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_ClientObjectInfo")
 #endif
 };
 
index 125df573893eebdf18a7add0ba39ac13d33229f4..24177af5d60284b7df64c995a0dc6752ab2513d0 100644 (file)
@@ -191,9 +191,7 @@ protected:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_Dome"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_Dome")
 #endif
 };
 
index 7ad9984888d910362d701a84015e35ae771fefc9..b99f44c38c5425ed12f0b2a2dfa07732f44713e2 100644 (file)
@@ -43,9 +43,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_EmptyObject"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_EmptyObject")
 #endif
 };
 
index 30fe89162c0d6c82bf17e31ed691e3f24438f012..170c9977296e8f8d9f15d028ee4cda1334a3a9f7 100644 (file)
@@ -69,12 +69,8 @@ protected:
 
        class RAS_IRenderTools* m_rendertools;  //needed for drawing routine
 
-#if 0 // WHY COMMENTED? - campbell
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_FontObject"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
-#endif
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_FontObject")
 #endif
 
 #ifdef WITH_PYTHON
index 2e30d77f8e529476474ed01f3fdf913b3a162070..6ca44e1f6e5e7fe068d893b2b0fda77657a4806d 100644 (file)
@@ -46,9 +46,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_IInterpolator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_IInterpolator")
 #endif
 };
 
index 3abcaa3a39ea15386b22ea2f0726a6304e10d5b0..266b89ff969cb2c879ef126ca757dd1551911ecc 100644 (file)
@@ -119,11 +119,10 @@ public:
                m_ipotime = time;
                m_modified = true;
        }
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_IpoSGController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_IpoSGController")
 #endif
 };
 
index 528bf00d574ef734660ae20e09960a89288f68c8..dd34549c1fb086b50d57da65b3dd0cda84debfa3 100644 (file)
@@ -141,9 +141,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_IPhysicsController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_IPhysicsController")
 #endif
 };
 
index 72842f311c914c36cef573ebbc5bce8096139631..2b5aefccfe789932685f53b3517af4ea7e746d4a 100644 (file)
@@ -44,9 +44,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_IScalarInterpolator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_IScalarInterpolator")
 #endif
 };
 
index 50390005f2b2b3ce5389aa0765d303c7d48cd235..919ae1d6de5a228f42a7810cf5b9bec2b9ec7c6a 100644 (file)
@@ -89,9 +89,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_ISceneConverter"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_ISceneConverter")
 #endif
 };
 
index 4a6f7223d0a97b76c0c9f512bc5b4954a2ff85b9..4ba71f8d239f78f93de5fcd20e91fd5238dc9a34 100644 (file)
@@ -55,9 +55,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_ISystem"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_ISystem")
 #endif
 };
 
index f9c6d59b6689f3cc6c71ba2223d378cb50eb02e4..b3bef016b0ffabe68306f4fafcf1c3a453805199 100644 (file)
@@ -443,9 +443,7 @@ protected:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_KetsjiEngine"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_KetsjiEngine")
 #endif
 };
 
index 15591bfa981a0fc64963a7ef596e84c5a8112ac4..3a3a9677b0449ea0bbe4d92f10f206a6103ee24b 100644 (file)
@@ -98,9 +98,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_LightIpoSGController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_LightIpoSGController")
 #endif
 };
 
index 11d92925a0232504094f7d83e1f81a80f0ce25d1..ee5546641c21df7425d5fff31eb2e8ebe89fec95 100644 (file)
@@ -58,9 +58,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_MaterialIpoController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_MaterialIpoController")
 #endif
 };
 
index 02470f88c5e8292542559d1b1295584326e2037b..3bead93cbdae62c646b2a551885928d3c0cb766b 100644 (file)
@@ -58,8 +58,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_MotionState"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_MotionState")
 #endif
 };
 
index d2f4c69bf4786ba1d7d7ec7a82c1ee516166cbb1..9a9b3dac098dd663dd34f7d14a3c065a0b451ee5 100644 (file)
@@ -73,9 +73,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_ObColorIpoSGController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_ObColorIpoSGController")
 #endif
 };
 
index 1a4ed534d169d5185451717fcaf9199a9929bb54..59014b70174f826d40b1d3516ae1dff833c04f4a 100644 (file)
@@ -56,9 +56,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-private:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_OrientationInterpolator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_OrientationInterpolator")
 #endif
 };
 
index ef5dfc8ac6bd68299972330b9902a807c9c90c2f..b5ab053bb0e20021493dbe2d079ce8f3035bee06 100644 (file)
@@ -56,9 +56,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-private:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_PositionInterpolator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_PositionInterpolator")
 #endif
 };
 
index 814443f5c64765ab88c17e0b256224425ef3108e..544080f31d01ddb65b0b952cf78c79e943af245b 100644 (file)
@@ -96,9 +96,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_RayCast"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_RayCast")
 #endif
 };
 
@@ -135,9 +133,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_RayCast::Callback"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_RayCast::Callback")
 #endif
 };
        
index fee2fe53227c0a1c3cdaa6b0409119efccab8055..f795495d1c91ffbb623a863fdf129d3854dd675d 100644 (file)
@@ -46,9 +46,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_RayEventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_RayEventManager")
 #endif
 };
 
index 734f82731b866ae6cff95384f4207e90a4868efb..76fefdebe083d08fb61105bf4bc35ba89305f1e4 100644 (file)
@@ -89,9 +89,7 @@ private :
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BoneParentRelation"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_BoneParentRelation")
 #endif
 };
 
index 44864c87cd7413484c92c6601f6622e35a740e1d..b5ab53029107a416b8b8e860aeecd0c2df8a468d 100644 (file)
@@ -88,9 +88,7 @@ private :
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_NormalParentRelation"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_NormalParentRelation")
 #endif
 };
 
@@ -145,9 +143,7 @@ private :
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_VertexParentRelation"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_VertexParentRelation")
 #endif
 };
 
@@ -228,9 +224,7 @@ private :
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_SlowParentRelation"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_SlowParentRelation")
 #endif
 };
 
index d08a32ce0aa12a0ae2f965379bdf9c2821f89646..5d8c31633765704434cfb127c585ee8918e7a114 100644 (file)
@@ -61,9 +61,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_ScalarInterpolator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_ScalarInterpolator")
 #endif
 };
 
index ae8b25f9185d558fb67ee1b96b0660a6f53a5bb4..52b6d0cf8ccd9ab68ca3e2244b2f9ccf08410824 100644 (file)
@@ -56,9 +56,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_ScalingInterpolator"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_ScalingInterpolator")
 #endif
 };
 
index 62b748716036d5f22601116efdda1ff7341591b7..ea7807396950b8bca64e1219953d9c5fb9363952 100644 (file)
@@ -129,9 +129,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_TimeCategoryLogger"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_TimeCategoryLogger")
 #endif
 };
 
index b2336c2c51295cc2246679fc4b2a21f4b68537f4..83c934ea81b81656aa6ec17237993224d56bad00 100644 (file)
@@ -107,9 +107,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_TimeLogger"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_TimeLogger")
 #endif
 };
 
index 38286cba9aa1a3910b8f3182d13bba6639d72062..d9a0164fd059ea13c12ac7651f9872b058186b3c 100644 (file)
@@ -81,9 +81,7 @@ public:
 
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_TouchEventManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_TouchEventManager")
 #endif
 };
 
index cb4e9de50c225b0b05f0879815029e8995c1a195..e4a73873fa1448b8ca044a0b7c3ce80435789242 100644 (file)
@@ -70,9 +70,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_WorldInfo"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_WorldInfo")
 #endif
 };
 
index 9578130b51ecc52c7e9be8a1896c2c22b4cd1237..409b1fec3215163f436ce818cb64c545f73186e2 100644 (file)
@@ -96,9 +96,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_WorldIpoController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_WorldIpoController")
 #endif
 };
 
index d4a3d12057ec5b8a67c59538357be1515c3b1937..8f903cc64fabe2107b7496417458986342e5bf96 100644 (file)
@@ -75,9 +75,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:NG_NetworkDeviceInterface"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:NG_NetworkDeviceInterface")
 #endif
 };
 
index 7a55891552f65a28197c1207b6cb559caaa14359..25e7fd9759657a952864381362efc26f300cfc12 100644 (file)
@@ -131,9 +131,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:NG_NetworkMessage"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:NG_NetworkMessage")
 #endif
 };
 
index b7b01bdad067113b01f41eed0558e0b6b34ac6d3..b9858cd8d4375fbe824ca1dc896e07a84f034e7e 100644 (file)
@@ -48,9 +48,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:NG_NetworkObject"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:NG_NetworkObject")
 #endif
 };
 
index b3ca4df9d50a047f89f629c13e10f542e0633de6..41ac8ead5e41a54e37133d053210200452a88f18 100644 (file)
@@ -111,9 +111,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:NG_NetworkScene"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:NG_NetworkScene")
 #endif
 };
 
index 07878b7162ec323d44c20236503c12963aeaa9ef..60ff475832bb3f2276675329c30b5c76d75de8d7 100644 (file)
@@ -83,9 +83,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CcdGraphicController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CcdGraphicController")
 #endif
 };
 
index 63c267443aa6a6d4ba952b1cf330eb4392e2742c..09afafbe0a76f3e23438f2b798016f92a0d7e071 100644 (file)
@@ -203,9 +203,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CcdShapeConstructionInfo"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CcdShapeConstructionInfo")
 #endif
 };
 
@@ -625,9 +623,7 @@ protected:
                }
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CcdPhysicsController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CcdPhysicsController")
 #endif
 };
 
@@ -659,9 +655,7 @@ class       DefaultMotionState : public PHY_IMotionState
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:DefaultMotionState"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:DefaultMotionState")
 #endif
 };
 
index 552cca801debb0f22cc2fe57d973636a7cc311c5..ef1c08730057b6cdd117c82a8a1de3704b90b978 100644 (file)
@@ -288,9 +288,7 @@ protected:
 
                
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CcdPhysicsEnvironment"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:CcdPhysicsEnvironment")
 #endif
 };
 
index 8e55c4a0c0f3da117761e89533de1dfe1bb76caa..5183f77176c5ed94d437ddb3f04a8a551ef68cba 100644 (file)
@@ -98,9 +98,7 @@ public:
 
                
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:DummyPhysicsEnvironment"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:DummyPhysicsEnvironment")
 #endif
 };
 
index d25af9f898c177032bfb494dd60298ba033f0a16..239ac3366e115fe449f88eda51546c6fd56198d6 100644 (file)
@@ -56,9 +56,7 @@ class PHY_IController
 
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IController")
 #endif
 };
 
index 6a94b3d6ea927c81e45675e90ed032f82f899420..af337188818f7c8076667299c954d4dffbc18dbd 100644 (file)
@@ -54,8 +54,7 @@ class PHY_IGraphicController : public PHY_IController
                virtual PHY_IGraphicController* GetReplica(class PHY_IMotionState* motionstate) {return 0;}
 
 #ifdef WITH_CXX_GUARDEDALLOC
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IController")
 #endif
 };
 
index 77c51ebdb79c2725eead2661e36b102d358b0dea..2eb2a9f39cfd7a4ca9e6b2bc579f459a4cd7bc4c 100644 (file)
@@ -61,9 +61,7 @@ class PHY_IMotionState
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IMotionState"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IMotionState")
 #endif
 };
 
index 727cbda931d029d8e3b663c31e96a199da089458..7eea2a183a1dceb4cee316843d466fe257033ee8 100644 (file)
@@ -102,10 +102,9 @@ class PHY_IPhysicsController : public PHY_IController
                
                PHY__Vector3    GetWorldPosition(PHY__Vector3& localpos);
 
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IPhysicsController"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IPhysicsController")
 #endif
 };
 
index a2597f917e3a14e4624444036e574ad6c446c1fa..8fde9e289dc16dfbf70062c2af07146dc72bfce6 100644 (file)
@@ -87,11 +87,10 @@ public:
                m_faceUV(faceUV)
        {
        }
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IRayCastFilterCallback"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IRayCastFilterCallback")
 #endif
 };
 
@@ -179,11 +178,10 @@ class PHY_IPhysicsEnvironment
                virtual float   getConstraintParam(int constraintId,int param) = 0;
                
                virtual void    exportFile(const char* filename) {};
-               
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IPhysicsEnvironment"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IPhysicsEnvironment")
 #endif
 };
 
index 735ce5a87912f9481e97677ba49821e696d38079..731e22d9f0f4d0e8706a3b9a142c7bbe11c7f63a 100644 (file)
@@ -62,9 +62,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:PHY_IVehicle"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IVehicle")
 #endif
 };
 
index c9af48fe51645ec19ddb848038069035f5c4abdd..93d143dd3ced3feae27ff58c5560a7f50e9fc0bb 100644 (file)
@@ -106,12 +106,10 @@ public:
        void RenderFilters(RAS_ICanvas* canvas);
 
        void EnableFilter(std::vector<STR_String>& propNames, void* gameObj, RAS_2DFILTER_MODE mode, int pass, STR_String& text);
-       
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_2DFilterManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_2DFilterManager")
 #endif
 };
 #endif
index dade2ad7c11938ace2c2d8e5594cd4476c0efd24..2650bc9f7229097527a064a36143214436b5f771 100644 (file)
@@ -84,10 +84,9 @@ private:
        void RenderAlphaBuckets(const MT_Transform& cameratrans, 
                RAS_IRasterizer* rasty, RAS_IRenderTools* rendertools);
 
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_BucketManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_BucketManager")
 #endif
 };
 
index 1e9a792634ac2870d53a0fbbde9e45aa36f7e75f..627db2b63fb45675b9cc25901b2856359ca487be 100644 (file)
@@ -93,10 +93,9 @@ protected:
        class RAS_MeshObject    *m_pMesh;
        bool  m_bDynamic;       
 
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_Deformer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_Deformer")
 #endif
 };
 
index fc5adc97657c9d05d55d5bb2afe5a67f139b29b7..6312f83737e7f72a60ca0bf7ee19592ae522b9d7 100644 (file)
@@ -163,9 +163,7 @@ private :
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_FrameSettings"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_FrameSettings")
 #endif
 }; 
 
@@ -300,14 +298,11 @@ private :
        RAS_FramingManager(
                const RAS_FramingManager &
        );
-       
+
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_FramingManager"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_FramingManager")
 #endif
 };
 
 #endif
-
index dae70c5c343dd85423dcf14da1fc69232d7649e2..713a06845acbdd211ea19e7535c1c4b40c42c997 100644 (file)
@@ -217,11 +217,10 @@ public:
        
 protected:
        RAS_MouseState m_mousestate;
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_ICanvas"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_ICanvas")
 #endif
 };
 
index 527114b300f3debb478d422885f5404af9bbdf3b..0f89af490d832a24d67b577e7ae08ba2fd6bf1b9 100644 (file)
@@ -185,12 +185,10 @@ public:
         * PreCalculate texture gen
         */
        virtual void OnConstruction(int layer){}
-               
-               
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_IPolyMaterial"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_IPolyMaterial")
 #endif
 };
 
index 828ee01d1506af1ecfbdd52c1538bf12c1ef4813..d4c19410eb1a574b2b03a627e38d4d7c29236218 100644 (file)
@@ -416,12 +416,10 @@ public:
 
        virtual void    SetAnisotropicFiltering(short level)=0;
        virtual short   GetAnisotropicFiltering()=0;
-       
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_IRasterizer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_IRasterizer")
 #endif
 };
 
index 1d9f70529752bf4ff26c2b6c6c2cfc3b792db3dc..5d3efb8c38a6a89dd8fbe368d95391f2a1be042f 100644 (file)
@@ -201,12 +201,10 @@ public:
        virtual
                void
        MotionBlur(RAS_IRasterizer* rasterizer)=0;
-               
-               
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_IRenderTools"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_IRenderTools")
 #endif
 };
 
index cff4d67d44b8726c3f1cd586242c02886620af54..7cf7fee7845225e44e61841ad702ff57485724ae 100644 (file)
@@ -175,12 +175,10 @@ public:
        bool IsCulled() { return m_bCulled; }
 #endif
        void SetCulled(bool culled) { m_bCulled = culled; }
-       
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_MeshSlot"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_MeshSlot")
 #endif
 };
 
@@ -195,9 +193,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_MeshMaterial"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_MeshMaterial")
 #endif
 };
 
@@ -254,11 +250,8 @@ private:
        
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_MaterialBucket"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_MaterialBucket")
 #endif
 };
 
 #endif //__RAS_MATERIAL_BUCKET
-
index ffe2964c058fafa3355a514cfc30fa507d448240..326110bea5709ab66dca5dc379b2f6bba807068e 100644 (file)
@@ -170,12 +170,10 @@ public:
        };
 
        vector<vector<SharedVertex> >   m_sharedvertex_map;
-       
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_MeshObject"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_MeshObject")
 #endif
 };
 
index 0b36bbf38769f8f21a192325d272194d9bffbcee..808c4f11dd883c9b28377a274475838a04278923 100644 (file)
@@ -73,12 +73,10 @@ public:
        virtual void    SetDrawingMode(int drawingmode);
 
        virtual bool    QueryLists(){return true;}
-       
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_ListRasterizer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_ListRasterizer")
 #endif
 };
 
index 3b4a6c4900c3435b8f093d81279803b73972ce66..36f768f647448348f0768b88a5ad0809e9d8a7a6 100644 (file)
@@ -315,12 +315,10 @@ public:
        
        virtual void    SetAnisotropicFiltering(short level);
        virtual short   GetAnisotropicFiltering();
-       
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_OpenGLRasterizer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_OpenGLRasterizer")
 #endif
 };
 
index d96f390ad74bd9bdc225d5e23cf02f956b93f73c..730431d31089881a51290deb996efa7f2713d5b2 100644 (file)
@@ -63,9 +63,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_VAOpenGLRasterizer"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_VAOpenGLRasterizer")
 #endif
 };
 
index a3bd6b600c911ccd2d92a6a507596741ef08f0cc..bc70b43286c273e0dcc4622ba13c8c27faf8af4e 100644 (file)
@@ -93,11 +93,10 @@ public:
 
        RAS_MaterialBucket*     GetMaterial();
        RAS_DisplayArray*       GetDisplayArray();
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_Polygon"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_Polygon")
 #endif
 };
 
index c845c2c21bde93bd6d2989a5cc200b6cda909692..cb5f7d47457b0bb74e07b50fdd5c5f79a2b90b78 100644 (file)
@@ -94,11 +94,10 @@ public:
        {
                m_y2 = y2;
        }
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_Rect"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_Rect")
 #endif
 };
 
index f76c6a66c86a1664c4db9b150b6ca84d5aecfcd3..15059a9cf127795e0f25ae8b9b7657e562fa7f79 100644 (file)
@@ -141,11 +141,10 @@ public:
        // compare two vertices, to test if they can be shared, used for
        // splitting up based on uv's, colors, etc
        bool                            closeTo(const RAS_TexVert* other);
-       
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_TexVert"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:RAS_TexVert")
 #endif
 };
 
index 33e29b85a5fac0cbb7285e5d44851a2047de6e9b..cd1c523ff4085ad07880b54228038d34d74fcfa0 100644 (file)
@@ -136,9 +136,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_BBox"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_BBox")
 #endif
 };
 
index 7100debe6324dbc459a9030cb386e906ee17804c..d82738dbb86c35c6e46b9898b807847a0edbeeb7 100644 (file)
 class SG_Controller 
 {
 public:
-
-#ifdef WITH_CXX_GUARDEDALLOC
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "SG_Controller"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
-#endif
-
        SG_Controller(
        ) :
                m_pObject(NULL) {
@@ -122,6 +116,9 @@ public:
 protected:
        SG_IObject*             m_pObject;
 
+#ifdef WITH_CXX_GUARDEDALLOC
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Controller")
+#endif
 };
 
 #endif //__SG_CONTROLLER_H__
index 90e3226f227ffd720d0fd1c13cba7e089066cad7..be1c1fda2f2da500870d245545dc6b78f1d64f64 100644 (file)
@@ -217,9 +217,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_DList"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_DList")
 #endif
 };
 
index a1d4207e5088e034651efd38e076ab332def4fe5..c36c984f3d3f327deeb28afcdcdd6dc3168d27c3 100644 (file)
@@ -367,9 +367,7 @@ protected :
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_IObject"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_IObject")
 #endif
 };
 
index 41133495f2e74d2ce88cdf3b59e5903f93a61a21..1d0c0e592e61d32b6df89e330c5772b3279dad91 100644 (file)
@@ -271,9 +271,7 @@ private:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_Node"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Node")
 #endif
 };
 
index 4140563828fc45e6bf75a389c0f6b349b4463a64..925c0ed2766f61da1594e4f25f15f50f5d131076 100644 (file)
@@ -131,9 +131,7 @@ protected :
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_ParentRelation"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_ParentRelation")
 #endif
 };
 
index e1288877b1d7d70cb2c5512d6ab81afcd963e2ff..bcc56f05615c6354350696eaa960208fd8c463d8 100644 (file)
@@ -157,9 +157,7 @@ public:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_QList"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_QList")
 #endif
 };
 
index 32f91103369c886309033a1e4389ef584b41ead1..e456851d183b559112515b8a4b0d29bc1cc5c37a 100644 (file)
@@ -287,9 +287,7 @@ protected:
 
 
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_Spatial"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Spatial")
 #endif
 };
 
index b2cbb227f777b5e7a702502874d92edcb6e301d2..e0d5c712b738547736f968b0d25e38b12dadfdaf 100644 (file)
@@ -115,9 +115,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_Tree"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_Tree")
 #endif
 };
 
@@ -158,9 +156,7 @@ public:
        
        
 #ifdef WITH_CXX_GUARDEDALLOC
-public:
-       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_TreeFactory"); }
-       void operator delete( void *mem ) { MEM_freeN(mem); }
+       MEM_CXX_CLASS_ALLOC_FUNCS("GE:SG_TreeFactory")
 #endif
 };