Text preview for : Fsp.mesa_Sep78.pdf part of xerox Fsp.mesa Sep78 xerox mesa 4.0_1978 listing Mesa_4_System Fsp.mesa_Sep78.pdf



Back to : Fsp.mesa_Sep78.pdf | Home

FSP.mesa 2-Sep-78 13:58:17 Page 1



-- Fsp.Mesa Edited by Sandman on May 12, 1978 9:18 AM
DIRECTORY
AltoDefs: FROM "altodefs" USING [PageSize],
FSPDefs: FROM "fspdefs" USING [
BlockSize, Oeallocator, FreeNodePointer, NodeHeader, NodePointer,
ZoneHeader, ZoneOverhead, ZonePointer],
ProcessDefs: FROM "processdefs" USING [InitializeMonitor],
StringDefs: FROM "stringdefs" USING [WordsForString],
SystemDefs: FROM "systemdefs" USING [
AllocateResidentPages, AllocateResidentSegment, FreePages, PagesForWords];
DEFINITIONS FROM FSPDefs;
FSP: MONITOR LOCKS z.lock USING z: ZonePointer
IMPORTS ProcessDefs, StringDefs, SystemDefs EXPORTS FSPDefs, SystemDefs
SHARES FSPDefs = PUBLIC
BEGIN -- Mesa Free Storage Package --
A set of procedures to manage allocation within a zone.
Coalescing of free nodes occurs during allocation; all
free nodes following a candidate node are merged before
any space is allocated. The logic is derived from a
BCPL program by E. M. McCreight and was suggested by an
exercise in Knuth Volume I, p. 453 #19
UsedNodeSize: PRIVATE BlockSize = SIZE [inuse NodeHeader];
FreeNodeSize: PRIVATE BlockSize = SIZE [free NodeHeader];
ZoneHeaderSize: PRIVATE BlockSize = SIZE [ZoneHeader];
ZoneTooSmall: ERROR [POINTER] = CODE;
DoNothingDeallocate: Deallocator