Last change
on this file since 125 was
115,
checked in by rosiere, 15 years ago
|
1) Write queue with mealy
2) Network : fix bug
3) leak memory
|
-
Property svn:keywords set to
Id
|
File size:
552 bytes
|
Rev | Line | |
---|
[112] | 1 | #ifndef MEMCHECK_H |
---|
| 2 | #define MEMCHECK_H |
---|
| 3 | #ifdef DEBUG_MEMORY_LEAK |
---|
| 4 | |
---|
| 5 | #include <cstddef> // For size_t |
---|
| 6 | |
---|
| 7 | // Usurp the new operator (both scalar and array versions) |
---|
[115] | 8 | void* operator new (std::size_t, const char*, long); |
---|
[112] | 9 | void* operator new[](std::size_t, const char*, long); |
---|
| 10 | #define new new (__FILE__, __LINE__) |
---|
[115] | 11 | |
---|
[112] | 12 | extern bool traceFlag; |
---|
| 13 | #define TRACE_ON() traceFlag = true |
---|
| 14 | #define TRACE_OFF() traceFlag = false |
---|
| 15 | |
---|
| 16 | extern bool activeFlag; |
---|
| 17 | #define MEM_ON() activeFlag = true |
---|
| 18 | #define MEM_OFF() activeFlag = false |
---|
| 19 | |
---|
| 20 | #endif // DEBUG_MEMORY_LEAK |
---|
| 21 | #endif // MEMCHECK_H |
---|
| 22 | |
---|
Note: See
TracBrowser
for help on using the repository browser.