Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-08-18 19:37:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-18 19:37:31 +0400
commit14d33b3c1fd629ca3ebc2f369b38d9d2ebc09e2e (patch)
tree5304235c3b0bb3f850a0b8e38c96618e9a6cb5aa /source/gameengine/Rasterizer/RAS_FramingManager.h
parent368262461641f23239c1a7bd2e6fa9d5057902e7 (diff)
BGE guardedalloc, Uses WITH_CXX_GUARDEDALLOC but gives a string to MEM_mallocN for better tracking memory usage.
* off by default. * new/delete are at the bottom of each class * python BGE objects have the new/delete in the Py_Header macro.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_FramingManager.h')
-rw-r--r--source/gameengine/Rasterizer/RAS_FramingManager.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/gameengine/Rasterizer/RAS_FramingManager.h b/source/gameengine/Rasterizer/RAS_FramingManager.h
index 4398e2d00c3..3ae794c430a 100644
--- a/source/gameengine/Rasterizer/RAS_FramingManager.h
+++ b/source/gameengine/Rasterizer/RAS_FramingManager.h
@@ -29,6 +29,10 @@
#ifndef RAS_FRAMINGMANAGER_H
#define RAS_FRAMINGMANAGER_H
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
class RAS_Rect;
/**
@@ -55,7 +59,6 @@ class RAS_Rect;
class RAS_FrameSettings
{
public :
-
/**
* enum defining the policy to use
* in each axis.
@@ -154,6 +157,13 @@ private :
float m_bar_b;
unsigned int m_design_aspect_width;
unsigned int m_design_aspect_height;
+
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_FrameSettings"); }
+ void operator delete( void *mem ) { MEM_freeN(mem); }
+#endif
};
struct RAS_FrameFrustum
@@ -274,6 +284,13 @@ private :
RAS_FramingManager(
const RAS_FramingManager &
);
+
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_FramingManager"); }
+ void operator delete( void *mem ) { MEM_freeN(mem); }
+#endif
};
#endif