<> <> <> <> <> <> SafeStorage: CEDAR DEFINITIONS = BEGIN <> TrimSystemZone: PROC; <> GetSystemZone: PROC RETURNS[ZONE]; <> GetPermanentZone: PROC RETURNS[ZONE]; <> <<>> <> SetCollectionInterval: PROC[newInterval: INT] RETURNS[previous: INT]; <> ReclaimCollectibleObjects: PROC[suspendMe: BOOL _ TRUE, traceAndSweep: BOOL _ FALSE]; <> <> ReclamationReason: TYPE = {clientRequest, clientTAndSRequest, clientNoTraceRequest, rcTableOverflow, allocationInterval, quantaNeeded, finalizationThreshold}; IsCollectorActive: PROC RETURNS[active: BOOL, previousIncarnation: INT]; WaitForCollectorStart: PROC RETURNS[incarnation: INT, reason: ReclamationReason, wordsAllocated, objectsAllocated: INT -- since previous collection was initiated --]; <<>> WaitForCollectorDone: PROC RETURNS[incarnation: INT, reason: ReclamationReason, wordsReclaimed: INT, objectsReclaimed: INT]; <> NWordsAllocated: PROC RETURNS[INT]; <> NWordsReclaimed: PROC RETURNS[INT]; <> <<>> <> PinObject: PROC[ref: REF ANY]; <> UnpinObject: PROC[ref: REF ANY]; <> <<>> <> TypeIndex: TYPE = [0..LAST[CARDINAL]/4]; -- 14 bits Type: TYPE = RECORD[TypeIndex]; nullType: Type = [0]; unspecType: Type = [1]; -- the distinguished type of UNSPECIFIED fhType: Type = [2]; -- the distinguished type of localFrames gfhType: Type = [3]; -- the distinguished type of globalFrames anyType: Type = [4]; -- the distinguished type of ANY lastPredefinedTypeIndex: TypeIndex = 4; <> <> GetReferentType: PROC[ref: REF ANY] RETURNS[type: Type]; GetCanonicalReferentType: PROC[ref: REF ANY] RETURNS[type: Type]; <<... gets the canonical type for the given type>> EquivalentTypes: PROC[t1, t2: Type] RETURNS[BOOL]; <<... tests the two types for equivalence (GetCanonicalType[t1] = GetCanonicalType[t2])>> GetCanonicalType: PROC[type: Type] RETURNS[Type]; <<... gets the canonical type for the given type>> IsReferentType: PROC[ref: REF ANY, type: Type] RETURNS[BOOL]; <<... tests the given ref for having the given referent type>> NarrowRef: PROC[ref: REF ANY, type: Type] RETURNS[REF ANY]; <> <> <> <> <> <> <> <<>> maxNPackageRefs: CARDINAL = 2; FinalizationQueue: TYPE = PRIVATE RECORD[REF ANY]; EstablishFinalization: PROC[type: Type, npr: [0..maxNPackageRefs], fq: FinalizationQueue]; <> <<>> ReEstablishFinalization: PROC[type: Type, npr: [0..maxNPackageRefs], fq: FinalizationQueue]; <> <> EnableFinalization: PROC[ref: REF ANY]; <> IsFinalizationEnabled: PROC[ref: REF ANY] RETURNS[BOOL]; <> NewFQ: PROC[length: CARDINAL _ 100] RETURNS [FinalizationQueue]; <> <<>> FQNext: PROC[fq: FinalizationQueue] RETURNS[REF ANY]; <<... waits for the given FinalizationQueue to be non-empty>> <<>> FQEmpty: PROC[fq: FinalizationQueue] RETURNS[BOOL]; <<... tests the given FinalizationQueue for being empty>> <<>> <> PutTypeAttachment: PROC[type: Type, attachment: REF ANY]; <<... associates a given REF with a given type>> <<>> GetTypeAttachment: PROC[type: Type] RETURNS[REF ANY]; <<... gets the REF associated with the given type>> <> MemoryExhausted: ERROR; NarrowFault: ERROR; NarrowRefFault: ERROR[ref: REF ANY, targetType: Type]; UnsafeProcAssignment: SIGNAL[proc: PROC ANY RETURNS ANY]; InvalidType: ERROR[type: Type]; CantEstablishFinalization: ERROR[type: Type]; END.