AllocWord:
TYPE =
MACHINE
DEPENDENT
RECORD[
SELECT
OVERLAID *
FROM
card => [card: CARD32],
int => [int: INT32],
pair => [hi, lo: CARD16],
bytes => [hh, hl, lh, ll: BYTE],
bits => [bits: PACKED ARRAY [0..32) OF BOOL],
ENDCASE
];
SegmentMetadata:
TYPE =
MONITORED
RECORD [
segmentId: Camelot.segmentIdT, -- id for segment
port: Mach.portT, -- port for segment
lowSize: CARD32,
segmentUse: YggCamelotSegment.SegmentUseType,
offsetToFirstAllocPage: YggFile.PageCount, -- how big is the preamble before allocatable storage
numberOfPages: YggFile.PageCount, -- number of pages that are allocatable in segment (excludes preamble storage)
freePages: INT, -- number of pages that are completely free (bits off in the shadow bitmap)
rover: YggFile.PageNumber,
DIDMapLogicalPage0: CARD32, -- page number that is page 0 (should be just after the allocation map; 0 means no DID Map)
NextDIDLogicalPage: CARD32, -- page number for where NextDID is stored (0 means no NextDID)
vmAddressForSegmentAllocMap: PTAllocBitmap, -- where in VM is the stable bitmap mapped
vmAddressForShadowAllocMap: PTAllocBitmap -- where in VM is the volatile bitmap mappe
];