#include <MemorySegment.hpp>
Public Member Functions | |
LargeSegmentSet () | |
LargeSegmentSet (RexxMemory *memory) | |
virtual | ~LargeSegmentSet () |
virtual void | dumpMemoryProfile (FILE *outfile) |
RexxObject * | handleAllocationFailure (size_t allocationLength) |
RexxObject * | allocateObject (size_t allocationLength) |
virtual DeadObject * | donateObject (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) |
MemorySegment * | first () |
MemorySegment * | next (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 MemorySegment * | donateSegment (size_t allocationLength) |
Protected Member Functions | |
virtual void | addDeadObject (DeadObject *object) |
virtual void | addDeadObject (char *object, size_t length) |
virtual MemorySegment * | allocateSegment (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 () |
RexxObject * | splitDeadObject (DeadObject *object, size_t allocationLength, size_t splitMinimum) |
void | insertSegment (MemorySegment *segment) |
MemorySegment * | findEmptySegment (size_t allocationLength) |
MemorySegment * | splitSegment (size_t allocationLength) |
void | mergeSegments (size_t allocationLength) |
void | combineEmptySegments (MemorySegment *front, MemorySegment *back) |
virtual size_t | suggestMemoryExpansion () |
virtual size_t | suggestMemoryContraction () |
MemorySegment * | largestActiveSegment () |
MemorySegment * | largestEmptySegment () |
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) |
MemorySegment * | getSegment (size_t requestLength, size_t minimumLength) |
void | activateEmptySegments () |
void | validateObject (size_t bytes) |
Private Member Functions | |
RexxObject * | findObject (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 |
RexxMemory * | memory |
Definition at line 539 of file MemorySegment.hpp.
|
inline |
Definition at line 544 of file MemorySegment.hpp.
LargeSegmentSet::LargeSegmentSet | ( | RexxMemory * | memory | ) |
Definition at line 188 of file MemorySegment.cpp.
|
inlinevirtual |
Definition at line 546 of file MemorySegment.hpp.
|
protectedvirtual |
Reimplemented from MemorySegmentSet.
Definition at line 417 of file MemorySegment.cpp.
References DeadObjectPool::addSortedBySize(), deadCache, largestObject, and smallestObject.
|
protectedvirtual |
Reimplemented from MemorySegmentSet.
Definition at line 359 of file MemorySegment.cpp.
References DeadObjectPool::addSortedBySize(), and deadCache.
|
inline |
Definition at line 549 of file MemorySegment.hpp.
References deadCache, DeadObjectPool::findBestFit(), LargeAllocationUnit, OREF_NULL, requests, and MemorySegmentSet::splitDeadObject().
Referenced by findObject(), RexxMemory::newObject(), and RexxMemory::newObjects().
|
protectedvirtual |
Reimplemented from MemorySegmentSet.
Definition at line 258 of file MemorySegment.cpp.
References MemorySegmentSet::memory, and RexxMemory::newLargeSegment().
|
protectedvirtual |
Reimplemented from MemorySegmentSet.
Definition at line 1093 of file MemorySegment.cpp.
References largestObject, MemorySegmentSet::memory, smallestObject, and RexxMemory::verboseMessage().
|
virtual |
Reimplemented from MemorySegmentSet.
Definition at line 543 of file MemorySegment.cpp.
References deadCache, and DeadObjectPool::findSmallestFit().
|
virtual |
Reimplemented from MemorySegmentSet.
Definition at line 142 of file MemorySegment.cpp.
References deadCache, and DeadObjectPool::dumpMemoryProfile().
Referenced by RexxMemory::dumpMemoryProfile().
|
protected |
Definition at line 1473 of file MemorySegment.cpp.
References MemorySegmentSet::activateEmptySegments(), MemorySegmentSet::addSegment(), RexxMemory::collect(), expandSegmentSet(), MemorySegmentSet::findEmptySegment(), MemorySegmentSet::largestActiveSegment(), MemorySegmentSet::largestEmptySegment(), MemorySegmentSet::memory, MemoryThrashingThreshold, MemorySegmentSet::mergeSegments(), requests, and MemorySegment::size().
Referenced by handleAllocationFailure().
|
protected |
Definition at line 1700 of file MemorySegment.cpp.
References LargeSegmentDeadSpace, MemorySegmentSet::memory, MinimumSegmentSize, MemorySegmentSet::newSegment(), roundSegmentBoundary(), SegmentDeadSpace, and RexxMemory::verboseMessage().
Referenced by expandOrCollect(), and handleAllocationFailure().
|
private |
Definition at line 1320 of file MemorySegment.cpp.
References allocateObject().
Referenced by handleAllocationFailure().
RexxObject * LargeSegmentSet::handleAllocationFailure | ( | size_t | allocationLength | ) |
Definition at line 1331 of file MemorySegment.cpp.
References Error_System_resources, expandOrCollect(), expandSegmentSet(), findObject(), MemorySegmentSet::memory, MemorySegmentSet::mergeSegments(), OREF_NULL, reportException(), requests, and RexxMemory::scavengeSegmentSets().
Referenced by RexxMemory::newObject(), and RexxMemory::newObjects().
|
protectedvirtual |
Reimplemented from MemorySegmentSet.
Definition at line 1030 of file MemorySegment.cpp.
References deadCache, DeadObjectPool::empty(), largestObject, MemorySegmentSet::prepareForSweep(), requests, and smallestObject.
|
private |
Definition at line 583 of file MemorySegment.hpp.
Referenced by addDeadObject(), allocateObject(), donateObject(), dumpMemoryProfile(), and prepareForSweep().
|
private |
Definition at line 586 of file MemorySegment.hpp.
Referenced by addDeadObject(), completeSweepOperation(), and prepareForSweep().
|
private |
Definition at line 584 of file MemorySegment.hpp.
Referenced by allocateObject(), expandOrCollect(), handleAllocationFailure(), and prepareForSweep().
|
private |
Definition at line 585 of file MemorySegment.hpp.
Referenced by addDeadObject(), completeSweepOperation(), and prepareForSweep().