-- Transport Mechanism Filestore - DEFS for heap file management. -- -- [Juniper]<Grapevine>MS>HeapFileDefs.mesa -- Andrew Birrell 10-Jun-81 10:17:39 -- DIRECTORY VMDefs: FROM "VMDefs" USING[ FullAddress, PageAddress ]; HeapFileDefs: DEFINITIONS = BEGIN FirstSegment: PROCEDURE RETURNS[ VMDefs.FullAddress ]; InsertFirstSegment: PROCEDURE RETURNS[ VMDefs.FullAddress ]; FreeSegment: PROCEDURE[ VMDefs.FullAddress, VMDefs.FullAddress ]; NextPage: PROCEDURE[ VMDefs.FullAddress ] RETURNS[ VMDefs.FullAddress ]; NoMorePages: ERROR; -- raised when "nextPage" is called for last page. Caught by compactor; an error for readers or writers -- NewWriterPage: PROCEDURE RETURNS[ VMDefs.FullAddress ]; NextWriterPage: PROCEDURE[ VMDefs.FullAddress ] RETURNS[ VMDefs.FullAddress ]; -- allocates another writer page -- CommitObject: PROCEDURE[ start, end: VMDefs.PageAddress ]; -- Writer is complete; chain into heap and allow compaction -- ObjectAbandoned: PROCEDURE[ start: VMDefs.PageAddress ]; -- Object not chained into heap is now free -- ClaimSinglePage: PROCEDURE RETURNS[ VMDefs.PageAddress ]; -- Claim next page on the written list; used when -- terminating single-page writers; locks out other short -- writers ending until call of CommitedSinglePage CommitedSinglePage: PROCEDURE; -- Single-page writer has committed; page may now be compacted END.