TracksMemoryManagerMoves <- CanAccessWhileMoving |
|
|
BeginModifyTrackedBytes BeginReadTrackedBytes EndModifyTrackedBytes EndReadTrackedBytes MoveMemoryBlock ReadTrackedBytes ReinitializeClass SetObjectSize WriteTrackedBytes |
Class CanAccessWhileMoving defines no new attributes.
Fields
No fields are defined by CanAccessWhileMoving or any of its superclasses.
Instance template
Class CanAccessWhileMoving cannot be instantiated.
Class definition
//------ PRIVATE ---------------------------------------------------------------------------------- // The format of the Cache object's extra data is as follows: // // RECORD // Structured extra list of references: // ARRAY [1..entryCount] OF // CacheEntryRefs; // Reference fields of cache entries // // Unstructured extra data: // CacheInfo; // Small structure that contains housekeeping information // // ARRAY [1..entryCount] OF // CacheEntry; // Integer fields of cache entries // // ARRAY [0..slotCount-1] OF // CacheIndex; // heads of slots' linked lists of entries // END; Define Class CanAccessWhileMoving; mixes in with Object; inherits from TracksMemoryManagerMoves; operation BeginReadTrackedBytes(): BlockTrackerPointer; // Creates a block tracker for this object. If a block tracker already // exists, its reference count is incremented. This way, there is always // at most a single block tracker for any object. operation EndReadTrackedBytes(); // Decrements the reference count for the block tracker for this object // if the reference count drops to zero, the block tracker is destroyed. operation BeginModifyTrackedBytes(): BlockTrackerPointer; // Creates a block tracker for this object. If a block tracker already // exists, its reference count is incremented. This way, there is always // at most a single block tracker for any object. operation EndModifyTrackedBytes(); // Decrements the reference count for the block tracker for this object // if the reference count drops to zero, the block tracker is destroyed. intrinsic ReadTrackedBytes(tracker: BlockTrackerPointer; offset: Unsigned; bufferSize: Unsigned; buffer: Pointer); // This can be called at interrupt time. It extracts <bufferSize> bytes // of data from the tracked object, starting at <offset>. // <bufferSize> + <offset> must be less than the size of the object. intrinsic WriteTrackedBytes(tracker: BlockTrackerPointer; offset: Unsigned; bufferSize: Unsigned; buffer: ReadOnlyPointer); // This can be called at interrupt time. It write <bufferSize> bytes // of data to the tracked object, starting at <offset>. // <bufferSize> + <offset> must be less than the size of the object. overrides MoveMemoryBlock; // If the object is being tracked, moves the object and keeps its block // tracker updated, otherwise just moves the object like Object_MoveMemoryBlock. // If you override MoveMemoryBlock for any other purpose in a subclass // you must call Inherited and must not attempt to move the block yourself. // If you inherit from this after a superclass already overrides // MoveMemoryBlock, that superclass' code will not execute. overrides ReinitializeClass; // Allocates the block tracker dictionary. #ifdef DEBUG overrides SetObjectSize; // Track the size of the block too. // This is only used for debug checks. #endif end class;