MemorySegment Class Reference

#include <MemorySegment.hpp>

Inheritance diagram for MemorySegment:
[legend]

Public Member Functions

void * operator new (size_t size, void *segment)
 
void operator delete (void *)
 
void operator delete (void *, void *)
 
 MemorySegment (size_t segSize)
 
 MemorySegment ()
 
void insertAfter (MemorySegment *newSegment)
 
void insertBefore (MemorySegment *newSegment)
 
void remove ()
 
void removeAll ()
 
bool isInSegment (RexxObject *object)
 
DeadObjectcreateDeadObject ()
 
DeadObjectfirstObject ()
 
void combine (MemorySegment *nextSegment)
 
void shrink (size_t delta)
 
bool isAdjacentTo (MemorySegment *seg)
 
bool isLastBlock (char *addr, size_t length)
 
bool isFirstBlock (char *addr)
 
size_t size ()
 
size_t realSize ()
 
char * start ()
 
char * end ()
 
bool isReal ()
 
bool isEmpty ()
 
void dump (const char *owner, size_t counter, FILE *keyfile, FILE *dumpfile)
 
DeadObjectlastDeadObject ()
 
DeadObjectfirstDeadObject ()
 
void gatherObjectStats (MemoryStats *memStats, SegmentStats *stats)
 
void markAllObjects ()
 

Public Attributes

char segmentStart [8]
 

Friends

class MemorySegmentSet
 
class NormalSegmentSet
 
class LargeSegmentSet
 
class OldSegmentSet
 
class RexxMemory
 

Additional Inherited Members

- Protected Attributes inherited from MemorySegmentHeader
size_t segmentSize
 
size_t liveObjects
 
MemorySegmentnext
 
MemorySegmentprevious
 

Detailed Description

Definition at line 143 of file MemorySegment.hpp.

Constructor & Destructor Documentation

◆ MemorySegment() [1/2]

MemorySegment::MemorySegment ( size_t  segSize)
inline

Definition at line 155 of file MemorySegment.hpp.

References MemorySegmentHeader::segmentSize.

◆ MemorySegment() [2/2]

MemorySegment::MemorySegment ( )
inline

Member Function Documentation

◆ combine()

void MemorySegment::combine ( MemorySegment nextSegment)
inline

◆ createDeadObject()

DeadObject* MemorySegment::createDeadObject ( )
inline

◆ dump()

void MemorySegment::dump ( const char *  owner,
size_t  counter,
FILE *  keyfile,
FILE *  dumpfile 
)

Definition at line 48 of file MemorySegment.cpp.

References MemorySegmentHeader::segmentSize, and segmentStart.

Referenced by MemorySegmentSet::dumpSegments().

◆ end()

◆ firstDeadObject()

DeadObject * MemorySegment::firstDeadObject ( )

Definition at line 89 of file MemorySegment.cpp.

References RexxMemory::markWord, memoryObject, and start().

Referenced by MemorySegmentSet::mergeSegments().

◆ firstObject()

DeadObject* MemorySegment::firstObject ( )
inline

Definition at line 197 of file MemorySegment.hpp.

References segmentStart.

Referenced by MemorySegmentSet::combineEmptySegments(), and removeAll().

◆ gatherObjectStats()

void MemorySegment::gatherObjectStats ( MemoryStats memStats,
SegmentStats stats 
)

Definition at line 104 of file MemorySegment.cpp.

References end(), SegmentStats::recordObject(), and start().

Referenced by MemorySegmentSet::gatherStats().

◆ insertAfter()

void MemorySegment::insertAfter ( MemorySegment newSegment)
inline

◆ insertBefore()

void MemorySegment::insertBefore ( MemorySegment newSegment)
inline

◆ isAdjacentTo()

bool MemorySegment::isAdjacentTo ( MemorySegment seg)
inline

Definition at line 200 of file MemorySegment.hpp.

References end().

Referenced by MemorySegmentSet::addSegment(), and MemorySegmentSet::mergeSegments().

◆ isEmpty()

bool MemorySegment::isEmpty ( )
inline

◆ isFirstBlock()

bool MemorySegment::isFirstBlock ( char *  addr)
inline

Definition at line 202 of file MemorySegment.hpp.

References start().

Referenced by MemorySegmentSet::splitSegment().

◆ isInSegment()

bool MemorySegment::isInSegment ( RexxObject object)
inline

Definition at line 191 of file MemorySegment.hpp.

References MemorySegmentHeader::segmentSize, and segmentStart.

Referenced by MemorySegmentSet::isInSegmentSet().

◆ isLastBlock()

bool MemorySegment::isLastBlock ( char *  addr,
size_t  length 
)
inline

Definition at line 201 of file MemorySegment.hpp.

References end().

Referenced by MemorySegmentSet::splitSegment().

◆ isReal()

◆ lastDeadObject()

DeadObject * MemorySegment::lastDeadObject ( )

Definition at line 62 of file MemorySegment.cpp.

References end(), RexxMemory::markWord, memoryObject, and start().

Referenced by MemorySegmentSet::mergeSegments().

◆ markAllObjects()

void MemorySegment::markAllObjects ( )

◆ operator delete() [1/2]

void MemorySegment::operator delete ( void *  )
inline

Definition at line 152 of file MemorySegment.hpp.

◆ operator delete() [2/2]

void MemorySegment::operator delete ( void *  ,
void *   
)
inline

Definition at line 153 of file MemorySegment.hpp.

◆ operator new()

void* MemorySegment::operator new ( size_t  size,
void *  segment 
)
inline

Definition at line 151 of file MemorySegment.hpp.

◆ realSize()

size_t MemorySegment::realSize ( )
inline

◆ remove()

◆ removeAll()

void MemorySegment::removeAll ( )
inline

◆ shrink()

void MemorySegment::shrink ( size_t  delta)
inline

Definition at line 199 of file MemorySegment.hpp.

References MemorySegmentHeader::segmentSize.

Referenced by MemorySegmentSet::splitSegment().

◆ size()

◆ start()

char* MemorySegment::start ( )
inline

Friends And Related Function Documentation

◆ LargeSegmentSet

friend class LargeSegmentSet
friend

Definition at line 146 of file MemorySegment.hpp.

◆ MemorySegmentSet

friend class MemorySegmentSet
friend

Definition at line 144 of file MemorySegment.hpp.

◆ NormalSegmentSet

friend class NormalSegmentSet
friend

Definition at line 145 of file MemorySegment.hpp.

◆ OldSegmentSet

friend class OldSegmentSet
friend

Definition at line 147 of file MemorySegment.hpp.

◆ RexxMemory

friend class RexxMemory
friend

Definition at line 148 of file MemorySegment.hpp.

Member Data Documentation

◆ segmentStart

char MemorySegment::segmentStart[8]

Definition at line 217 of file MemorySegment.hpp.

Referenced by createDeadObject(), dump(), end(), firstObject(), isInSegment(), and start().


The documentation for this class was generated from the following files: