tMemStackItem Class Reference

List of all members.

Public Member Functions

 tMemStackItem ()
 ~tMemStackItem ()
void Alloc ()

Public Attributes

void * memory
int size


Detailed Description

Definition at line 45 of file tMemStack.cpp.


Constructor & Destructor Documentation

tMemStackItem::tMemStackItem (  )  [inline]

Definition at line 51 of file tMemStack.cpp.

References memory, NULL, and size.

00052     {
00053         memory = NULL;
00054         size   = 0;
00055     }

tMemStackItem::~tMemStackItem (  )  [inline]

Definition at line 57 of file tMemStack.cpp.

References free, and memory.

00058     {
00059         if ( memory )
00060             free(memory);
00061     }


Member Function Documentation

void tMemStackItem::Alloc (  )  [inline]

Definition at line 63 of file tMemStack.cpp.

References free, malloc, memory, size, and ST_Size().

Referenced by tMemStack::IncreaseMem(), and tMemStack::tMemStack().

00064     {
00065         if ( ST_Size() > size )
00066         {
00067             size = ST_Size();
00068             if ( memory )
00069                 free(memory);
00070 
00071             memory = malloc( size );
00072 
00073 
00074             for ( int i = size-1; i>=0; --i )
00075 
00076             {
00077 
00078                 ((char*)(memory))[i] = 0;
00079 
00080             }
00081 
00082         }
00083     }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

void* tMemStackItem::memory

Definition at line 48 of file tMemStack.cpp.

Referenced by Alloc(), tMemStack::GetMem(), tMemStackItem(), and ~tMemStackItem().

int tMemStackItem::size

Definition at line 49 of file tMemStack.cpp.

Referenced by Alloc(), tMemStack::GetSize(), and tMemStackItem().


The documentation for this class was generated from the following file:
Generated on Sat Mar 15 23:57:39 2008 for Armagetron Advanced by  doxygen 1.5.4