edbee - Qt Editor Library
Namespaces | Macros | Functions
debug_new.cpp File Reference
#include <QMutexLocker>
#include <QMutex>
#include "debug_allocs.h"
#include <stdlib.h>
#include <stdio.h>
+ Include dependency graph for debug_new.cpp:

Namespaces

 edbee
 Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
 

Macros

#define debug_new_log
 Copyright 2011-2013 - Reliable Bits Software by Blommers IT. More...
 

Functions

void * debug_malloc (size_t size, const char *file, const int line)
 Logs a malloc operation. More...
 
void debug_free (void *p, const char *file, const int line)
 frees the given pointer More...
 
void * operator new (size_t size, const char *file, const int line)
 the new operator More...
 
void operator delete (void *p, const char *file, const int line)
 th delete operator More...
 
void operator delete (void *p) throw ()
 the delete operator More...
 
void * operator new[] (size_t size, const char *file, const int line)
 the new array operator More...
 
void operator delete[] (void *p, const char *file, const int line)
 the delete array operator More...
 
void operator delete[] (void *p) throw ()
 the delete array operator More...
 
void edbee::pause_memleak_detection (bool value)
 pauses the memoryleak detection More...
 

Macro Definition Documentation

◆ debug_new_log

#define debug_new_log

Copyright 2011-2013 - Reliable Bits Software by Blommers IT.

All Rights Reserved. Author Rick Blommers

Function Documentation

◆ debug_free()

void debug_free ( void *  p,
const char *  file,
const int  line 
)

frees the given pointer

Parameters
pthe pointer to free
filethe file which call originated from
linethe linenumber of the delete
Todo:
: This doesn't work very good. It sees to many free that are NOT allocated by us

◆ debug_malloc()

void* debug_malloc ( size_t  size,
const char *  file,
const int  line 
)

Logs a malloc operation.

Copyright 2011-2013 - Reliable Bits Software by Blommers IT.

Parameters
sizethe size of reseved bytes
filethe file of the malloc
linethe line number of the allocation

◆ operator delete() [1/2]

void operator delete ( void *  p,
const char *  file,
const int  line 
)

th delete operator

◆ operator delete() [2/2]

void operator delete ( void *  p)
throw (
)

the delete operator

◆ operator delete[]() [1/2]

void operator delete[] ( void *  p,
const char *  file,
const int  line 
)

the delete array operator

◆ operator delete[]() [2/2]

void operator delete[] ( void *  p)
throw (
)

the delete array operator

◆ operator new()

void* operator new ( size_t  size,
const char *  file,
const int  line 
)

the new operator

◆ operator new[]()

void* operator new[] ( size_t  size,
const char *  file,
const int  line 
)

the new array operator