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.
This commit is contained in:
Campbell Barton
2009-08-18 15:37:31 +00:00
parent 3682624616
commit 14d33b3c1f
123 changed files with 1068 additions and 36 deletions

View File

@@ -66,6 +66,13 @@ public:
virtual void SetDrawingMode(int drawingmode);
virtual bool QueryLists(){return true;}
#ifdef WITH_CXX_GUARDEDALLOC
public:
void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:RAS_ListRasterizer"); }
void operator delete( void *mem ) { MEM_freeN(mem); }
#endif
};
#endif