ResourceAreaChunk Class Reference

#include <allocation.hpp>

Inheritance diagram for ResourceAreaChunk:

Inheritance graph
[legend]
Collaboration diagram for ResourceAreaChunk:

Collaboration graph
[legend]
List of all members.

Public Member Functions

char * allocate_bytes (int size)
 ResourceAreaChunk (int min_capacity, ResourceAreaChunk *previous)
 ~ResourceAreaChunk ()
void initialize (ResourceAreaChunk *previous)
int capacity ()
int used ()
bool contains (void *p)
void print ()
void print_short ()

Protected Member Functions

void print_alloc (char *addr, int size)

Private Member Functions

void clear (char *start, char *end)
void clear ()
void freeTo (char *new_first_free)

Private Attributes

char * bottom
char * top
char * first_free
ResourceAreaChunkprev
int _allocated
int _previous_used

Friends

class ResourceMark
class ResourceArea
class Resources

Detailed Description

Definition at line 128 of file allocation.hpp.


Constructor & Destructor Documentation

ResourceAreaChunk::ResourceAreaChunk ( int  min_capacity,
ResourceAreaChunk previous 
)

Definition at line 65 of file allocation.cpp.

References AllocateHeap(), bottom, initialize(), max(), min_resource_chunk_size, min_resource_free_size, and top.

Here is the call graph for this function:

ResourceAreaChunk::~ResourceAreaChunk (  ) 

Definition at line 84 of file allocation.cpp.

References bottom, and FreeHeap().

Here is the call graph for this function:


Member Function Documentation

char* ResourceAreaChunk::allocate_bytes ( int  size  )  [inline]

Definition at line 145 of file allocation.hpp.

References first_free, print_alloc(), PrintResourceAllocation, and top.

Referenced by ResourceArea::allocate_bytes(), and ResourceArea::allocate_more_bytes().

Here is the call graph for this function:

int ResourceAreaChunk::capacity (  )  [inline]

Definition at line 161 of file allocation.hpp.

References bottom, and top.

Referenced by Resources::getFromFreeList(), initialize(), and Resources::new_chunk().

void ResourceAreaChunk::clear (  )  [inline, private]

Definition at line 141 of file allocation.hpp.

References bottom, and first_free.

Referenced by freeTo().

void ResourceAreaChunk::clear ( char *  start,
char *  end 
) [inline, private]

Definition at line 140 of file allocation.hpp.

Referenced by Resources::addToFreeList().

bool ResourceAreaChunk::contains ( void *  p  )  [inline]

Definition at line 164 of file allocation.hpp.

References bottom, contains(), prev, and top.

Referenced by ResourceArea::contains(), and contains().

Here is the call graph for this function:

void ResourceAreaChunk::freeTo ( char *  new_first_free  )  [private]

Definition at line 197 of file allocation.cpp.

References assert, clear(), and first_free.

Here is the call graph for this function:

void ResourceAreaChunk::initialize ( ResourceAreaChunk previous  ) 

Definition at line 76 of file allocation.cpp.

References _allocated, _previous_used, bottom, capacity(), first_free, prev, and used().

Referenced by Resources::new_chunk(), and ResourceAreaChunk().

Here is the call graph for this function:

void ResourceAreaChunk::print (  )  [virtual]

Implements PrintableCHeapObj.

Definition at line 88 of file allocation.cpp.

References bottom, lprintf(), prev, print(), print_short(), and top.

Referenced by print().

Here is the call graph for this function:

void ResourceAreaChunk::print_alloc ( char *  addr,
int  size 
) [protected]

Definition at line 95 of file allocation.cpp.

References outputStream::print_cr(), and std.

Referenced by allocate_bytes().

Here is the call graph for this function:

void ResourceAreaChunk::print_short (  )  [virtual]

Reimplemented from PrintableCHeapObj.

Definition at line 94 of file allocation.cpp.

References outputStream::print(), and std.

Referenced by print().

Here is the call graph for this function:

int ResourceAreaChunk::used (  )  [inline]

Definition at line 162 of file allocation.hpp.

References bottom, and first_free.

Referenced by initialize(), and ResourceArea::used().


Friends And Related Function Documentation

friend class ResourceArea [friend]

Definition at line 130 of file allocation.hpp.

friend class ResourceMark [friend]

Definition at line 129 of file allocation.hpp.

friend class Resources [friend]

Definition at line 131 of file allocation.hpp.


Member Data Documentation

int ResourceAreaChunk::_allocated [private]

Definition at line 137 of file allocation.hpp.

Referenced by ResourceArea::capacity(), and initialize().

int ResourceAreaChunk::_previous_used [private]

Definition at line 138 of file allocation.hpp.

Referenced by initialize(), and ResourceArea::used().

char* ResourceAreaChunk::bottom [private]

Definition at line 132 of file allocation.hpp.

Referenced by capacity(), clear(), contains(), initialize(), print(), ResourceAreaChunk(), used(), and ~ResourceAreaChunk().

char* ResourceAreaChunk::first_free [private]

Definition at line 134 of file allocation.hpp.

Referenced by allocate_bytes(), clear(), freeTo(), initialize(), ResourceMark::ResourceMark(), and used().

ResourceAreaChunk* ResourceAreaChunk::prev [private]

Definition at line 135 of file allocation.hpp.

Referenced by Resources::addToFreeList(), contains(), Resources::getFromFreeList(), initialize(), print(), ResourceArea::used(), ResourceArea::~ResourceArea(), and ResourceMark::~ResourceMark().

char* ResourceAreaChunk::top [private]

Definition at line 133 of file allocation.hpp.

Referenced by allocate_bytes(), capacity(), contains(), print(), and ResourceAreaChunk().


The documentation for this class was generated from the following files:
Generated on Mon Oct 9 14:15:21 2006 for Strongtalk VM by  doxygen 1.4.7