FXMemDbg.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                    Debug monitoring of memory allocation                      *
00004 *                                                                               *
00005 *********************************************************************************
00006 *        Copyright (C) 2002-2006 by Niall Douglas.   All Rights Reserved.       *
00007 *       NOTE THAT I DO NOT PERMIT ANY OF MY CODE TO BE PROMOTED TO THE GPL      *
00008 *********************************************************************************
00009 * This code is free software; you can redistribute it and/or modify it under    *
00010 * the terms of the GNU Library General Public License v2.1 as published by the  *
00011 * Free Software Foundation EXCEPT that clause 3 does not apply ie; you may not  *
00012 * "upgrade" this code to the GPL without my prior written permission.           *
00013 * Please consult the file "License_Addendum2.txt" accompanying this file.       *
00014 *                                                                               *
00015 * This code is distributed in the hope that it will be useful,                  *
00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                          *
00018 *********************************************************************************
00019 * $Id:                                                                          *
00020 ********************************************************************************/
00021 
00062 #undef new
00063 #undef malloc
00064 #undef calloc
00065 #undef realloc
00066 #undef free
00067 
00068 #ifdef FXMEMDBG_H
00069 #undef FXMEMDBG_H
00070 #else
00071 #define FXMEMDBG_H
00072 
00073 #if defined(DEBUG) && !defined(FXMEMDBG_DISABLE)
00074 #define new new(_fxmemdbg_current_file_, __FUNCTION__, __LINE__, 0, 0)
00075 //#define new(...)      new          (_fxmemdbg_current_file_, __FUNCTION__, __LINE__, __VA_ARGS__)
00076 #define malloc(...)     malloc_dbg   (_fxmemdbg_current_file_, __FUNCTION__, __LINE__, __VA_ARGS__)
00077 #define calloc(...)     calloc_dbg   (_fxmemdbg_current_file_, __FUNCTION__, __LINE__, __VA_ARGS__)
00078 #define realloc(...)    realloc_dbg  (_fxmemdbg_current_file_, __FUNCTION__, __LINE__, __VA_ARGS__)
00079 
00080 #endif
00081 
00082 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:23 2009 for TnFOX by doxygen v1.4.7