DIRECTORY PrincOps USING[PsbIndex], Process USING[GetCurrent], RTRefCounts USING[InternalReclaim]; RTStorageAccounting: DEFINITIONS IMPORTS Process, RTRefCounts = BEGIN PSBIMap: TYPE = RECORD[elements: SEQUENCE maxLength: [0..LAST[PrincOps.PsbIndex]+1] OF CellCount]; CellCount: TYPE = RECORD[total, current: LONG INTEGER]; defaultCollectionInterval: LONG CARDINAL = 40000B; nWordsRequested: LONG CARDINAL; nWordsAllocated: LONG CARDINAL; SUMnWordsAllocated: LONG CARDINAL; nObjectsCreated: LONG CARDINAL; MapPsbiToWordsAllocated: LONG POINTER TO PSBIMap; CollectionInterval: LONG INTEGER; SuspensionThreshold: LONG INTEGER; ResetNWordsAllocated: PROC; ResetTotalNWordsAllocatedOnly: PROC; ConsiderCollection: PROC[requestedWords, suppliedWords: LONG CARDINAL] = INLINE { psbi: PrincOps.PsbIndex = LOOPHOLE[Process.GetCurrent[]]; nw: LONG INTEGER _ MapPsbiToWordsAllocated.elements[psbi].current + suppliedWords; MapPsbiToWordsAllocated.elements[psbi].current _ nw; nWordsAllocated _ nWordsAllocated + suppliedWords; nWordsRequested _ nWordsRequested + requestedWords; -- total count for all processes IF LOOPHOLE[nWordsAllocated, INT] >= CollectionInterval THEN RTRefCounts.InternalReclaim[allocationInterval, nw > SuspensionThreshold]; }; END. ¨RTStorageAccounting.Mesa last edited May 17, 1983 12:25 pm by Paul Rovner TYPES CONSTANTS VARIABLES PROCS total count for all processes since the last colection Κ– "cedar" style˜Iprocšœ™šœ0™0K˜šΟk ˜ Kšœ œ ˜Kšœœ ˜Kšœ œ˜#—K˜Kšœ ˜ Kšœ˜šœ˜K™—šœ™šœ œ˜Kšœ œœœ ˜R—K˜Kš œ œœœœ˜7K˜—šœ ™ Kšœœœ ˜2K˜—šœ ™ Kšœœœ˜Kšœœœ˜Kšœœœ˜"Kšœœœ˜Kšœœœœ ˜1Kšœœœ˜!Kšœœœ˜"K˜—šœ™KšΟnœœ˜K˜Kšžœœ˜$K˜Kšžœœ œœ˜Hšœ˜Kšœœ˜9KšœœœB˜RKšœ4˜4Kšœ2˜2Kšœ6™6Kšœ5Οc ˜Ušœœœ˜7KšœK˜O—Kšœ˜——K˜Kšœ˜—K˜—…—κ¨