ooRexx  4.2.0-source
About: ooRexx (Open Object Rexx) is a free implementation of Object Rexx. Object Rexx is an enhancement of the classic Rexx interpreter; a full-featured programming language with a human-oriented syntax.
  Fossies Dox: ooRexx-4.2.0-source.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

RexxMemory.hpp File Reference
#include "SysSemaphore.hpp"
#include "IdentityTableClass.hpp"
#include "MemoryStats.hpp"
#include "MemorySegment.hpp"
Include dependency graph for RexxMemory.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MemorySegmentPoolHeader
 
class  MemorySegmentPool
 
class  RexxMemory
 

Macros

#define ObjectGrain   8
 
#define LargeAllocationUnit   1024
 
#define VeryLargeAllocationUnit   4096
 
#define VeryLargeObjectGrain   256
 
#define MinimumObjectSize   ((size_t)24)
 
#define MaximumObjectSize   ((size_t)0xfffffff0)
 
#define IsObjectGrained(o)   ((((size_t)o)%ObjectGrain) == 0)
 
#define IsValidSize(s)   ((s) >= MinimumObjectSize && ((s) % ObjectGrain) == 0)
 
#define setUpFlatten(type)
 
#define cleanUpFlatten   }
 
#define ObjectNeedsMarking(oref)   ((oref) != OREF_NULL && !((oref)->isObjectMarked(liveMark)) )
 
#define memory_mark(oref)   if (ObjectNeedsMarking(oref)) memoryObject.mark((RexxObject *)(oref))
 
#define memory_mark_general(oref)   (memoryObject.markGeneral((void *)&(oref)))
 
#define flatten_reference(oref, envel)   if (oref) envel->flattenReference((void *)&newThis, newSelf, (void *)&(oref))
 
#define CLASS_CREATE(name, id, className)   The##name##Class = (className *)new (sizeof(className), id, The##name##ClassBehaviour, The##name##Behaviour) RexxClass;
 

Typedefs

typedef char MEMORY_POOL_STATE
 

Enumerations

enum  {
  LIVEMARK, RESTORINGIMAGE, SAVINGIMAGE, FLATTENINGOBJECT,
  UNFLATTENINGOBJECT
}
 

Functions

void SetObjectLive (void *o, size_t mark)
 
size_t roundObjectBoundary (size_t n)
 
size_t roundLargeObjectAllocation (size_t n)
 
size_t roundObjectResize (size_t n)
 
void saveObject (RexxInternalObject *o)
 
void discardObject (RexxInternalObject *o)
 
void holdObject (RexxInternalObject *o)
 
void discardHoldObject (RexxInternalObject *o)
 
RexxObjectnew_object (size_t s)
 
RexxObjectnew_object (size_t s, size_t t)
 
RexxArraynew_arrayOfObject (size_t s, size_t c, size_t t)
 

Macro Definition Documentation

◆ CLASS_CREATE

#define CLASS_CREATE (   name,
  id,
  className 
)    The##name##Class = (className *)new (sizeof(className), id, The##name##ClassBehaviour, The##name##Behaviour) RexxClass;

Definition at line 445 of file RexxMemory.hpp.

◆ cleanUpFlatten

#define cleanUpFlatten   }

Definition at line 432 of file RexxMemory.hpp.

◆ flatten_reference

#define flatten_reference (   oref,
  envel 
)    if (oref) envel->flattenReference((void *)&newThis, newSelf, (void *)&(oref))

Definition at line 440 of file RexxMemory.hpp.

◆ IsObjectGrained

#define IsObjectGrained (   o)    ((((size_t)o)%ObjectGrain) == 0)

Definition at line 92 of file RexxMemory.hpp.

◆ IsValidSize

#define IsValidSize (   s)    ((s) >= MinimumObjectSize && ((s) % ObjectGrain) == 0)

Definition at line 93 of file RexxMemory.hpp.

◆ LargeAllocationUnit

#define LargeAllocationUnit   1024

Definition at line 76 of file RexxMemory.hpp.

◆ MaximumObjectSize

#define MaximumObjectSize   ((size_t)0xfffffff0)

Definition at line 86 of file RexxMemory.hpp.

◆ memory_mark

#define memory_mark (   oref)    if (ObjectNeedsMarking(oref)) memoryObject.mark((RexxObject *)(oref))

Definition at line 436 of file RexxMemory.hpp.

◆ memory_mark_general

#define memory_mark_general (   oref)    (memoryObject.markGeneral((void *)&(oref)))

Definition at line 437 of file RexxMemory.hpp.

◆ MinimumObjectSize

#define MinimumObjectSize   ((size_t)24)

Definition at line 85 of file RexxMemory.hpp.

◆ ObjectGrain

#define ObjectGrain   8

Definition at line 74 of file RexxMemory.hpp.

◆ ObjectNeedsMarking

#define ObjectNeedsMarking (   oref)    ((oref) != OREF_NULL && !((oref)->isObjectMarked(liveMark)) )

Definition at line 435 of file RexxMemory.hpp.

◆ setUpFlatten

#define setUpFlatten (   type)
Value:
{ \
size_t newSelf = envelope->currentOffset; \
type * volatile newThis = (type *)this;

Definition at line 427 of file RexxMemory.hpp.

◆ VeryLargeAllocationUnit

#define VeryLargeAllocationUnit   4096

Definition at line 78 of file RexxMemory.hpp.

◆ VeryLargeObjectGrain

#define VeryLargeObjectGrain   256

Definition at line 80 of file RexxMemory.hpp.

Typedef Documentation

◆ MEMORY_POOL_STATE

typedef char MEMORY_POOL_STATE

Definition at line 124 of file RexxMemory.hpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LIVEMARK 
RESTORINGIMAGE 
SAVINGIMAGE 
FLATTENINGOBJECT 
UNFLATTENINGOBJECT 

Definition at line 113 of file RexxMemory.hpp.

Function Documentation

◆ discardHoldObject()

void discardHoldObject ( RexxInternalObject o)
inline

Definition at line 419 of file RexxMemory.hpp.

References RexxMemory::discardHoldObject(), and memoryObject.

◆ discardObject()

void discardObject ( RexxInternalObject o)
inline

Definition at line 417 of file RexxMemory.hpp.

References RexxMemory::discardObject(), and memoryObject.

◆ holdObject()

void holdObject ( RexxInternalObject o)
inline

Definition at line 418 of file RexxMemory.hpp.

References RexxMemory::holdObject(), and memoryObject.

Referenced by ProtectedObject::~ProtectedObject().

◆ new_arrayOfObject()

RexxArray* new_arrayOfObject ( size_t  s,
size_t  c,
size_t  t 
)
inline

Definition at line 425 of file RexxMemory.hpp.

References memoryObject, and RexxMemory::newObjects().

Referenced by RexxClause::newToken(), and RexxClause::RexxClause().

◆ new_object() [1/2]

RexxObject* new_object ( size_t  s)
inline

Definition at line 422 of file RexxMemory.hpp.

References memoryObject, and RexxMemory::newObject().

Referenced by RexxInternalObject::clone(), RexxClass::createInstance(), RexxCompoundElement::newInstance(), RexxInternalStack::newInstance(), RexxActivationFrameBuffer::newInstance(), RexxVariable::newInstance(), RexxHashTable::newInstance(), RexxString::newString(), RexxString::newUpperString(), RexxSmartBuffer::operator new(), RexxExpressionMessage::operator new(), RexxStack::operator new(), CPPCode::operator new(), RexxClass::operator new(), RexxDotVariable::operator new(), RexxStemVariable::operator new(), RexxParseVariable::operator new(), RexxVariableReference::operator new(), PackageClass::operator new(), RoutineClass::operator new(), RexxDoBlock::operator new(), LibraryDirective::operator new(), RequiresDirective::operator new(), RexxExpressionLogical::operator new(), RexxSupplier::operator new(), RexxPointer::operator new(), RexxClause::operator new(), RexxCompoundVariable::operator new(), RexxExpressionFunction::operator new(), RexxMessage::operator new(), RexxInstruction::operator new(), ClassDirective::operator new(), CommandHandler::operator new(), RexxEnvelope::operator new(), RexxListTable::operator new(), SecurityManager::operator new(), RexxContext::operator new(), RexxTrigger::operator new(), RexxInteger::operator new(), RexxCode::operator new(), LibraryPackage::operator new(), StackFrameClass::operator new(), WeakReference::operator new(), RexxNativeActivation::operator new(), RexxMutableBuffer::operator new(), InterpreterInstance::operator new(), RexxBinaryOperator::operator new(), RexxStem::operator new(), RexxNativeMethod::operator new(), AttributeGetterCode::operator new(), RexxUnaryOperator::operator new(), RexxSaveStack::operator new(), RexxBuffer::operator new(), RexxNumberString::operator new(), AttributeSetterCode::operator new(), RexxMethod::operator new(), RexxArray::operator new(), RexxNativeRoutine::operator new(), ConstantGetterCode::operator new(), RexxActivity::operator new(), RexxSource::operator new(), RegisteredRoutine::operator new(), AbstractCode::operator new(), RexxActivation::operator new(), RexxInternalObject::operator new(), RexxObject::operator new(), RexxToken::operator new(), RexxNilObject::operator new(), RexxString::rawString(), and RexxSource::sourceNewObject().

◆ new_object() [2/2]

RexxObject* new_object ( size_t  s,
size_t  t 
)
inline

Definition at line 423 of file RexxMemory.hpp.

References memoryObject, and RexxMemory::newObject().

◆ roundLargeObjectAllocation()

size_t roundLargeObjectAllocation ( size_t  n)
inline

Definition at line 96 of file RexxMemory.hpp.

References LargeAllocationUnit, and RXROUNDUP.

Referenced by OldSpaceSegmentSet::allocateObject(), and RexxMemory::newObject().

◆ roundObjectBoundary()

◆ roundObjectResize()

size_t roundObjectResize ( size_t  n)
inline

Definition at line 97 of file RexxMemory.hpp.

References ObjectGrain, and RXROUNDUP.

Referenced by RexxMemory::reSize().

◆ saveObject()

void saveObject ( RexxInternalObject o)
inline

Definition at line 416 of file RexxMemory.hpp.

References memoryObject, and RexxMemory::saveObject().

◆ SetObjectLive()

void SetObjectLive ( void *  o,
size_t  mark 
)
inline

Definition at line 89 of file RexxMemory.hpp.

type
int type
Definition: cmdparse.cpp:1965