-- Space.mesa Last Edited by Curry on October 1, 1980
Space: DEFINITIONS = BEGIN
HeapZone: PROCEDURE RETURNS [POINTER];
InitHeap:PROCEDURE[npages:CARDINAL];
EraseHeap:PROCEDURE;
GetSpace: PROCEDURE[nwords: CARDINAL] RETURNS [p:POINTER];
FreeSpace: PROCEDURE [p: POINTER];
FreeSpaceNil: PROCEDURE [p: POINTER]
RETURNS [nil: POINTER] = INLINE
BEGIN FreeSpace[p]; RETURN[NIL] END;
GetSpaceLong: PROCEDURE[nwords: CARDINAL]
RETURNS [lp:LONG POINTER];
FreeSpaceLong: PROCEDURE [lp: LONG POINTER];
FreeSpaceLongNil: PROCEDURE [lp: POINTER]
RETURNS [nil: LONG POINTER] = INLINE
BEGIN FreeSpaceLong[lp]; RETURN[NIL] END;
GetString: PROCEDURE[nchars: CARDINAL] RETURNS [s:STRING];
FreeString: PROCEDURE [s: STRING];
FreeStringNil: PROCEDURE [s: STRING]
RETURNS [nil: STRING] = INLINE
BEGIN FreeString[s]; RETURN[NIL] END;
CopyString: PROCEDURE [s: STRING, longer: CARDINAL ← 0]
RETURNS [newS: STRING];
EmptyString: PROCEDURE [s: STRING] RETURNS [BOOLEAN] =
INLINE BEGIN RETURN[s = NIL OR s.length = 0] END;
ConstructLongPointer: PROCEDURE
[pointer:POINTER, bank:UNSPECIFIED]
RETURNS [LONG POINTER] = MACHINE CODE BEGIN END;
END.