UnsafeStorage.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Paul Rovner, May 10, 1983 10:26 am
Russ Atkinson (RRA) February 1, 1985 3:09:09 pm PST
Doug Wyatt, February 24, 1985 8:08:05 pm PST
UnsafeStorage: DEFINITIONS
= BEGIN
NewUObject: PROC [size: CARDINAL, zone: UNCOUNTED ZONE] RETURNS [LONG POINTER];
... allocates a new object with given # of words from the given zone. Use this instead of uz.NEW if explicit control of the size arg is required.
GetSystemUZone: PROC RETURNS[UNCOUNTED ZONE];
Access to a pre-defined UNCOUNTED ZONE
GetTransientPageUZone: PROC RETURNS[UNCOUNTED ZONE];
Access to a pre-defined UNCOUNTED ZONE with special properties. First, page sized objects should be allocated (due to framentation). Second, the objects are transient. Third, the object is page aligned (the header is on the previous page). The amount of storage is used is the number of pages needed to hold the object, plus one.
In the normal case, the object is allocated and returned without page faults using a single procedure call. The object is physically in memory, and may be used without page faults. When deallocated, the returned physical memory is marked "unchanged" to VM, so it is never written to disk, or read back from disk. A list of available blocks of VM is kept so that VM allocation is normally not necessary.
Under heavy system load, normal paging and reclaimantion may cause page faults.
Use this zone for allocation of "page buffers" for the server side of RPC interfaces (e.g., use this zone inside of "parameterStorage" when the RPC interface is being exported).
InvalidPointer: ERROR[ptr: LONG POINTER]; -- Raised by FREE
END.