-- StorageGVImpl.mesa: give them Storage in the MDS -- Ted Wobber, 18-Jan-83 13:29:02 -- Mark Johnson, 11-Nov-81 12:24:20 DIRECTORY Heap USING [CreateMDS], Storage -- the Grapevine "Storage" EXPORTed -- ; StorageGVImpl: PROGRAM IMPORTS Heap EXPORTS Storage = BEGIN mz: MDSZone = Heap.CreateMDS[10 -- pages initially -- ]; Words: TYPE = RECORD [SEQUENCE COMPUTED CARDINAL OF UNSPECIFIED]; Node: PUBLIC PROC [nwords: CARDINAL] RETURNS [p: POINTER] = { p ¬ mz.NEW[Words [nwords]]}; String: PUBLIC PROC [nchars: CARDINAL] RETURNS [s: STRING] = { s ¬ mz.NEW[StringBody [nchars]]}; Free: PUBLIC PROC [p: POINTER] = {mz.FREE[@p]}; FreeString: PUBLIC PROC [s: STRING] = {mz.FREE[@s]}; END.