SUMO - Simulation of Urban MObility
|
#include <new>
#include <stdio.h>
#include "_nvwa.h"
#include "c++11.h"
Go to the source code of this file.
Data Structures | |
class | debug_new_counter |
class | debug_new_recorder |
Macros | |
#define | _DEBUG_NEW_REDEFINE_NEW 1 |
#define | _DEBUG_NEW_TYPE 1 |
#define | DEBUG_NEW NVWA::debug_new_recorder(__FILE__, __LINE__) ->* new |
#define | new DEBUG_NEW |
Functions | |
int | check_leaks () |
int | check_mem_corruption () |
void | operator delete (void *ptr, const char *file, int line) _NOEXCEPT |
void | operator delete[] (void *ptr, const char *file, int line) _NOEXCEPT |
void * | operator new (size_t size, const char *file, int line) |
void * | operator new[] (size_t size, const char *file, int line) |
Variables | |
static debug_new_counter | __debug_new_count |
bool | new_autocheck_flag |
FILE * | new_output_fp |
const char * | new_progname |
bool | new_verbose_flag |
Header file for checking leaks caused by unmatched new/delete.
Definition in file debug_new.h.
#define _DEBUG_NEW_REDEFINE_NEW 1 |
Definition at line 78 of file debug_new.h.
#define _DEBUG_NEW_TYPE 1 |
Macro to indicate which variant of DEBUG_NEW is wanted. The default value 1
allows the use of placement new (like new(std::nothrow)
), but the verbose output (when nvwa::new_verbose_flag is true
) looks worse than some older versions (no file/line information for allocations). Define it to 2
to revert to the old behaviour that records file and line information directly on the call to operator new
.
Definition at line 93 of file debug_new.h.
#define DEBUG_NEW NVWA::debug_new_recorder(__FILE__, __LINE__) ->* new |
Macro to catch file/line information on allocation. If _DEBUG_NEW_REDEFINE_NEW is 0
, one can use this macro directly; otherwise new
will be defined to it, and one must use new
instead.
Definition at line 115 of file debug_new.h.
#define new DEBUG_NEW |
Definition at line 121 of file debug_new.h.
int check_leaks | ( | ) |
int check_mem_corruption | ( | ) |
void operator delete | ( | void * | ptr, |
const char * | file, | ||
int | line | ||
) |
void operator delete[] | ( | void * | ptr, |
const char * | file, | ||
int | line | ||
) |
void* operator new | ( | size_t | size, |
const char * | file, | ||
int | line | ||
) |
void* operator new[] | ( | size_t | size, |
const char * | file, | ||
int | line | ||
) |
|
static |
Counting object for each file including debug_new.h.
Definition at line 177 of file debug_new.h.
bool new_autocheck_flag |
FILE* new_output_fp |
const char* new_progname |
bool new_verbose_flag |