Space.mesa August 31, 1984 12:40:17 pm PDT by Plass
Cedar PilotBridge version
Copyright (C) Xerox Corporation 1982. All rights reserved.
DIRECTORY
Basics, PrincOps, VM;
Space: DEFINITIONS IMPORTS VM =
BEGIN
Basic parameters and types:
wordsPerPage: CARDINAL = VM.wordsPerPage;
PageNumber: TYPE = VM.PageNumber;
PageCount: TYPE = VM.PageCount;
PageOffset: TYPE = VM.PageCount;
Interval: TYPE = RECORD [pointer: LONG POINTER, count: VM.PageCount];
nullInterval: Interval = [pointer: NIL, count: 0];
Access: TYPE = {readWrite, readOnly};
Life: TYPE = {alive, dead};
Usage: TYPE = [0..2048);
unknownUsage: Usage = 0;
ScratchMap: PROCEDURE [count: VM.PageCount, usage: Usage ← unknownUsage]
RETURNS [pointer: LONG POINTER];
Unmap: PROCEDURE [pointer: LONG POINTER, returnWait: ReturnWait ← wait]
RETURNS [nil: LONG POINTER];
ReturnWait: TYPE = {return, wait};
Swapping commands:
Activate: PROCEDURE [interval: Interval];
ActivateProc: PROCEDURE [proc: --GENERIC-- PROCEDURE];
Deactivate: PROCEDURE [interval: Interval];
DeactivateProc: PROCEDURE [proc: --GENERIC-- PROCEDURE];
ForceOut: PROCEDURE [interval: Interval];
Kill: PROCEDURE [interval: Interval];
Access control:
SetAccess: PROCEDURE [interval: Interval, access: Access];
MakeReadOnly: PROCEDURE [interval: Interval] = INLINE {
SetAccess[interval, readOnly]};
MakeWritable: PROCEDURE [interval: Interval] = INLINE {
SetAccess[interval, readWrite]};
Explicit virtual memory allocation and management:
Allocate: PROCEDURE [count: VM.PageCount] RETURNS [interval: Interval];
Deallocate: PROCEDURE [interval: Interval];
Miscellaneous operations:
LongPointerFromPage: PROCEDURE [page: VM.PageNumber]
RETURNS [LONG POINTER] = INLINE {
RETURN[VM.AddressForPageNumber[page]]};
PageFromLongPointer: PROCEDURE [pointer: LONG POINTER]
RETURNS [VM.PageNumber] = INLINE {
RETURN[VM.PageNumberForAddress[pointer]]};
PagesFromWords: PROCEDURE [wordCount: LONG CARDINAL]
RETURNS [pageCount: VM.PageCount] = INLINE {
RETURN[VM.PagesForWords[wordCount]]};
Signals and errors:
Error: ERROR [type: ErrorType];
ErrorType: TYPE = {
alreadyAllocated, alreadyDeallocated, incompleteSwapUnits, invalidParameters,
invalidProcedure, invalidSwapUnitSize, invalidWindow, stillMapped,
notAllocated, notMapped, noWindow, pointerPastEndOfMemory, readOnly};
InsufficientSpace: ERROR [available: VM.PageCount];
IOError: ERROR [page: VM.PageNumber];
Not provided in Cedar version: Window, Map Class, SwapUnitOption, defaultSwapUnitOption, SwapUnitType, SwapUnitSize, defaultSwapUnitSize, GetMapUnitAttributes, GetSwapUnitAttributes, CopyIn, CopyOut, MDS, defaultBase, MapAt, UnmapAt, Pointer, PointerFromPage
END.
LOG
17-Mar-82 17:11:48 DKnutsen Created file from Space.mesa of 8-Aug-81.
12-Aug-82 9:46:08 DKnutsen Twiddles.
23-Aug-82 11:43:17 Luniewski Mods for long page numbers and counts.
30-Aug-82 15:15:56 DKnutsen Map gets life arg.
1-Sep-82 11:20:42 DKnutsen Add pilotResident class.
6-Oct-82 9:53:33 Luniewski Added Life parameter to MapAt.
24-Nov-82 19:45:02 Luniewski Window.file => File.File.
31-Mar-83 9:50:11 DKnutsen
Result of Map and MapAt was named wrong. Get Page<=>LongPointer from Environment.
5-Apr-83 16:29:49 DKnutsen Deleted ClientUsage and PilotUsage.
23-Jun-83 16:17:13 Gibbons Removed default on count parameter of Window
6-Jul-83 17:52:42 DKnutsen ActivateProc arg is PROCEDURE, not UNSPECIFIED.
Time: August 31, 1984 12:40:42 pm PDT By: Plass Action: Created Cedar PilotBridge version from version of 06-Jul-83 17:52:44 PDT