Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
StorageSpec.Storage HistoryHide minor edits - Show changes to output 2010-04-18 09:10
by -
Changed line 8 from:
(* TRUE if to:
(* TRUE if this implementation uses garbage collection, otherwise FALSE. *) 2010-04-18 09:07
by -
Changed lines 3-21 from:
(* Dynamic FROM SYSTEM IMPORT ADDRESS (* Allocates a block of contiguous memory of the specified If PROCEDURE REALLOCATE( p : ADDRESS; newSize : WORD ) : ADDRESS; (* Enlarges a previously allocated memory block at address p to a size newSize. block of memory The address of the enlarged or newly allocated block is then returned PROCEDURE (* [DISPOSE] *) DEALLOCATE( p : ADDRESS ) : ADDRESS; (* Deallocates a previously allocated block of memory at address p. Always returns NIL. *) END Storage to:
(* Dynamic Memory Allocation and Management *) FROM SYSTEM IMPORT ADDRESS; CONST isGarbageCollected = <implementation defined constant>; (* TRUE if the implementation uses garbage collection, otherwise FALSE. *) (* Allocator *) PROCEDURE ALLOCATE( VAR p : ADDRESS; size : LONGCARD ); (* Allocates a block of contiguous memory of the specified size and passes its address back in p. Passes back NIL if memory could not be allocated. This procedure is required by pervasive macro-procedure NEW. *) (* Deallocator *) PROCEDURE DEALLOCATE( p : ADDRESS; size : LONGCARD ); (* Deallocates a previously allocated block of memory of at address p if the value of isGarbageCollection in FALSE, otherwise returns without action. This procedure is required by pervasive macro-procedure DISPOSE. *) END Storage..@] |