Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

l_mem.h

Go to the documentation of this file.
00001 /*
00002 ===========================================================================
00003 Copyright (C) 1999-2005 Id Software, Inc.
00004 
00005 This file is part of Quake III Arena source code.
00006 
00007 Quake III Arena source code is free software; you can redistribute it
00008 and/or modify it under the terms of the GNU General Public License as
00009 published by the Free Software Foundation; either version 2 of the License,
00010 or (at your option) any later version.
00011 
00012 Quake III Arena source code is distributed in the hope that it will be
00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Foobar; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 ===========================================================================
00021 */
00022 
00023 
00024 //=============================================================================
00025 
00026 // memory.h
00027 //#define MEMDEBUG
00028 #undef MEMDEBUG
00029 
00030 #ifndef MEMDEBUG
00031 
00032 void *GetClearedMemory(int size);
00033 void *GetMemory(unsigned long size);
00034 
00035 #else
00036 
00037 #define GetMemory(size)             GetMemoryDebug(size, #size, __FILE__, __LINE__);
00038 #define GetClearedMemory(size)  GetClearedMemoryDebug(size, #size, __FILE__, __LINE__);
00039 //allocate a memory block of the given size
00040 void *GetMemoryDebug(unsigned long size, char *label, char *file, int line);
00041 //allocate a memory block of the given size and clear it
00042 void *GetClearedMemoryDebug(unsigned long size, char *label, char *file, int line);
00043 //
00044 void PrintMemoryLabels(void);
00045 #endif //MEMDEBUG
00046 
00047 void FreeMemory(void *ptr);
00048 int MemorySize(void *ptr);
00049 void PrintMemorySize(unsigned long size);
00050 int TotalAllocatedMemory(void);
00051 

Generated on Thu Aug 25 12:37:17 2005 for Quake III Arena by  doxygen 1.3.9.1