-- GriffinMemoryFns.mesa
--m.stone October 7, 1980 3:12 PM
--Tiberi December 11, 1979 12:46 AM
--Maureen Stone January 19, 1983 6:53 pm
-- Last Edited by: Pier, February 13, 1984 5:51:31 pm PST

DIRECTORY
 GriffinMemoryDefs: FROM "GriffinMemoryDefs",
 UnsafeStorage USING [GetSystemUZone, NewUObject],
 SafeStorage USING [GetPermanentZone];

GriffinMemoryFns: PROGRAM
IMPORTS UnsafeStorage, SafeStorage
EXPORTS GriffinMemoryDefs =
BEGIN

CZone: PUBLIC ZONE;
UCZone: PUBLIC UNCOUNTED ZONE;

Allocate: PUBLIC PROCEDURE[nwords: CARDINAL] RETURNS[LONG POINTER] =
BEGIN
RETURN[UnsafeStorage.NewUObject[nwords,UCZone]];
END;

Free: PUBLIC PROCEDURE[ptr: LONG POINTER] ={ IF ptr#NIL THEN UCZone.FREE[@ptr]; };

Initialize: PUBLIC PROC = {
 UCZone ← UnsafeStorage.GetSystemUZone[];
 CZone ← SafeStorage.GetPermanentZone[];
 };

END.