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

l_memory.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

int AvailableMemory (void)
void DumpMemory (void)
void FreeMemory (void *ptr)
void * GetClearedHunkMemory (unsigned long size)
void * GetClearedMemory (unsigned long size)
void * GetHunkMemory (unsigned long size)
void * GetMemory (unsigned long size)
int MemoryByteSize (void *ptr)
void PrintMemoryLabels (void)
void PrintUsedMemorySize (void)


Function Documentation

int AvailableMemory void   ) 
 

Definition at line 440 of file l_memory.c.

References botlib_import_s::AvailableMemory, and botimport.

Referenced by AAS_AreaRouteToGoalArea().

00441 {
00442     return botimport.AvailableMemory();
00443 } //end of the function AvailableMemory

void DumpMemory void   ) 
 

void FreeMemory void *  ptr  ) 
 

Definition at line 423 of file l_memory.c.

00424 {
00425     unsigned long int *memid;
00426 
00427     memid = (unsigned long int *) ((char *) ptr - sizeof(unsigned long int));
00428 
00429     if (*memid == MEM_ID)
00430     {
00431         botimport.FreeMemory(memid);
00432     } //end if
00433 } //end of the function FreeMemory

void* GetClearedHunkMemory unsigned long  size  ) 
 

Definition at line 405 of file l_memory.c.

References Com_Memset(), GetHunkMemory(), line, and ptr().

Referenced by AAS_InitAASLinkedEntities(), AAS_LoadAASLump(), AAS_LoadBSPFile(), AAS_ParseBSPEntities(), AAS_Setup(), BotLoadMatchPieces(), BotLoadMatchTemplates(), BotLoadRandomStrings(), BotLoadReplyChat(), BotLoadSynonyms(), EA_Setup(), InitConsoleMessageHeap(), LoadItemConfig(), and LoadWeaponConfig().

00407 {
00408     void *ptr;
00409 #ifdef MEMDEBUG
00410     ptr = GetHunkMemoryDebug(size, label, file, line);
00411 #else
00412     ptr = GetHunkMemory(size);
00413 #endif //MEMDEBUG
00414     Com_Memset(ptr, 0, size);
00415     return ptr;
00416 } //end of the function GetClearedHunkMemory

Here is the call graph for this function:

void* GetClearedMemory unsigned long  size  ) 
 

Definition at line 363 of file l_memory.c.

References Com_Memset(), GetMemory(), line, and ptr().

00365 {
00366     void *ptr;
00367 #ifdef MEMDEBUG
00368     ptr = GetMemoryDebug(size, label, file, line);
00369 #else
00370     ptr = GetMemory(size);
00371 #endif //MEMDEBUG
00372     Com_Memset(ptr, 0, size);
00373     return ptr;
00374 } //end of the function GetClearedMemory

Here is the call graph for this function:

void* GetHunkMemory unsigned long  size  ) 
 

Definition at line 384 of file l_memory.c.

References botimport, botlib_import_s::HunkAlloc, and ptr().

Referenced by AAS_InitAASLinkHeap(), AAS_ParseBSPEntities(), and GetClearedHunkMemory().

00386 {
00387     void *ptr;
00388     unsigned long int *memid;
00389 
00390     ptr = botimport.HunkAlloc(size + sizeof(unsigned long int));
00391     if (!ptr) return NULL;
00392     memid = (unsigned long int *) ptr;
00393     *memid = HUNK_ID;
00394     return (unsigned long int *) ((char *) ptr + sizeof(unsigned long int));
00395 } //end of the function GetHunkMemory

Here is the call graph for this function:

void* GetMemory unsigned long  size  ) 
 

Definition at line 342 of file l_memory.c.

00344 {
00345     void *ptr;
00346     unsigned long int *memid;
00347 
00348     ptr = botimport.GetMemory(size + sizeof(unsigned long int));
00349     if (!ptr) return NULL;
00350     memid = (unsigned long int *) ptr;
00351     *memid = MEM_ID;
00352     return (unsigned long int *) ((char *) ptr + sizeof(unsigned long int));
00353 } //end of the function GetMemory

int MemoryByteSize void *  ptr  ) 
 

void PrintMemoryLabels void   ) 
 

Definition at line 459 of file l_memory.c.

Referenced by AAS_StartFrame(), and Export_BotLibShutdown().

00460 {
00461 } //end of the function PrintMemoryLabels

void PrintUsedMemorySize void   ) 
 

Definition at line 450 of file l_memory.c.

Referenced by AAS_StartFrame().

00451 {
00452 } //end of the function PrintUsedMemorySize


Generated on Thu Aug 25 12:42:56 2005 for Quake III Arena by  doxygen 1.3.9.1