LargeSegmentSet Class Reference

#include <MemorySegment.hpp>

Inheritance diagram for LargeSegmentSet:
[legend]

Public Member Functions

 LargeSegmentSet ()
 
 LargeSegmentSet (RexxMemory *memory)
 
virtual ~LargeSegmentSet ()
 
virtual void dumpMemoryProfile (FILE *outfile)
 
RexxObjecthandleAllocationFailure (size_t allocationLength)
 
RexxObjectallocateObject (size_t allocationLength)
 
virtual DeadObjectdonateObject (size_t allocationLength)
 
- Public Member Functions inherited from MemorySegmentSet
 MemorySegmentSet (RexxMemory *memObject, SegmentSetID id, const char *setName)
 
 MemorySegmentSet ()
 
virtual ~MemorySegmentSet ()
 
void * operator new (size_t size, void *segment)
 
void operator delete (void *size)
 
void operator delete (void *size, void *segment)
 
void removeSegment (MemorySegment *segment)
 
void removeSegmentAndStorage (MemorySegment *segment)
 
void add (MemorySegment *segment)
 
MemorySegmentfirst ()
 
MemorySegmentnext (MemorySegment *segment)
 
bool isInSegmentSet (RexxObject *object)
 
void dumpSegments (FILE *keyfile, FILE *dumpfile)
 
void addSegment (MemorySegment *segment, bool createDeadObject=1)
 
void sweep ()
 
bool is (SegmentSetID id)
 
void gatherStats (MemoryStats *memStats, SegmentStats *stats)
 
virtual MemorySegmentdonateSegment (size_t allocationLength)
 

Protected Member Functions

virtual void addDeadObject (DeadObject *object)
 
virtual void addDeadObject (char *object, size_t length)
 
virtual MemorySegmentallocateSegment (size_t requestLength, size_t minimumLength)
 
void expandOrCollect (size_t allocationLength)
 
void expandSegmentSet (size_t allocationLength)
 
virtual void prepareForSweep ()
 
void completeSweepOperation ()
 
- Protected Member Functions inherited from MemorySegmentSet
virtual void collectEmptySegments ()
 
RexxObjectsplitDeadObject (DeadObject *object, size_t allocationLength, size_t splitMinimum)
 
void insertSegment (MemorySegment *segment)
 
MemorySegmentfindEmptySegment (size_t allocationLength)
 
MemorySegmentsplitSegment (size_t allocationLength)
 
void mergeSegments (size_t allocationLength)
 
void combineEmptySegments (MemorySegment *front, MemorySegment *back)
 
virtual size_t suggestMemoryExpansion ()
 
virtual size_t suggestMemoryContraction ()
 
MemorySegmentlargestActiveSegment ()
 
MemorySegmentlargestEmptySegment ()
 
void adjustMemorySize ()
 
void releaseEmptySegments (size_t releaseSize)
 
void releaseSegment (MemorySegment *segment)
 
bool newSegment (size_t requestLength, size_t minimumLength)
 
float freeMemoryPercentage ()
 
size_t totalFreeMemory ()
 
size_t calculateSegmentAllocation (size_t n)
 
void addSegments (size_t requiredSpace)
 
MemorySegmentgetSegment (size_t requestLength, size_t minimumLength)
 
void activateEmptySegments ()
 
void validateObject (size_t bytes)
 

Private Member Functions

RexxObjectfindObject (size_t allocationLength)
 

Private Attributes

DeadObjectPool deadCache
 
size_t requests
 
size_t smallestObject
 
size_t largestObject
 

Additional Inherited Members

- Public Types inherited from MemorySegmentSet
enum  SegmentSetID { SET_UNINITIALIZED , SET_NORMAL , SET_LARGEBLOCK , SET_OLDSPACE }
 
- Protected Attributes inherited from MemorySegmentSet
MemorySegment anchor
 
MemorySegment emptySegments
 
size_t count
 
size_t liveObjectBytes
 
size_t deadObjectBytes
 
SegmentSetID owner
 
const char * name
 
RexxMemorymemory
 

Detailed Description

Definition at line 539 of file MemorySegment.hpp.

Constructor & Destructor Documentation

◆ LargeSegmentSet() [1/2]

LargeSegmentSet::LargeSegmentSet ( )
inline

Definition at line 544 of file MemorySegment.hpp.

◆ LargeSegmentSet() [2/2]

LargeSegmentSet::LargeSegmentSet ( RexxMemory memory)

Definition at line 188 of file MemorySegment.cpp.

◆ ~LargeSegmentSet()

virtual LargeSegmentSet::~LargeSegmentSet ( )
inlinevirtual

Definition at line 546 of file MemorySegment.hpp.

Member Function Documentation

◆ addDeadObject() [1/2]

void LargeSegmentSet::addDeadObject ( char *  object,
size_t  length 
)
protectedvirtual

Reimplemented from MemorySegmentSet.

Definition at line 417 of file MemorySegment.cpp.

References DeadObjectPool::addSortedBySize(), deadCache, largestObject, and smallestObject.

◆ addDeadObject() [2/2]

void LargeSegmentSet::addDeadObject ( DeadObject object)
protectedvirtual

Reimplemented from MemorySegmentSet.

Definition at line 359 of file MemorySegment.cpp.

References DeadObjectPool::addSortedBySize(), and deadCache.

◆ allocateObject()

RexxObject* LargeSegmentSet::allocateObject ( size_t  allocationLength)
inline

◆ allocateSegment()

MemorySegment * LargeSegmentSet::allocateSegment ( size_t  requestLength,
size_t  minimumLength 
)
protectedvirtual

Reimplemented from MemorySegmentSet.

Definition at line 258 of file MemorySegment.cpp.

References MemorySegmentSet::memory, and RexxMemory::newLargeSegment().

◆ completeSweepOperation()

void LargeSegmentSet::completeSweepOperation ( )
protectedvirtual

◆ donateObject()

DeadObject * LargeSegmentSet::donateObject ( size_t  allocationLength)
virtual

Reimplemented from MemorySegmentSet.

Definition at line 543 of file MemorySegment.cpp.

References deadCache, and DeadObjectPool::findSmallestFit().

◆ dumpMemoryProfile()

void LargeSegmentSet::dumpMemoryProfile ( FILE *  outfile)
virtual

Reimplemented from MemorySegmentSet.

Definition at line 142 of file MemorySegment.cpp.

References deadCache, and DeadObjectPool::dumpMemoryProfile().

Referenced by RexxMemory::dumpMemoryProfile().

◆ expandOrCollect()

◆ expandSegmentSet()

void LargeSegmentSet::expandSegmentSet ( size_t  allocationLength)
protected

◆ findObject()

RexxObject * LargeSegmentSet::findObject ( size_t  allocationLength)
private

Definition at line 1320 of file MemorySegment.cpp.

References allocateObject().

Referenced by handleAllocationFailure().

◆ handleAllocationFailure()

◆ prepareForSweep()

void LargeSegmentSet::prepareForSweep ( )
protectedvirtual

Member Data Documentation

◆ deadCache

DeadObjectPool LargeSegmentSet::deadCache
private

◆ largestObject

size_t LargeSegmentSet::largestObject
private

Definition at line 586 of file MemorySegment.hpp.

Referenced by addDeadObject(), completeSweepOperation(), and prepareForSweep().

◆ requests

size_t LargeSegmentSet::requests
private

◆ smallestObject

size_t LargeSegmentSet::smallestObject
private

Definition at line 585 of file MemorySegment.hpp.

Referenced by addDeadObject(), completeSweepOperation(), and prepareForSweep().


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