Hardware manual

WriteDiskDescriptor() If changes have occurred, the copy of the disk descriptor for
sysDisk that resides in memory is written onto the disk file
"DiskDescriptor."
ReadDiskDescriptor() This function restores the copy of the disk descriptor for sysDisk
that resides in memory from the disk file "DiskDescriptor."
3.6. Memory management
Table 3.1 shows the layout of memory. Table 3.2 tells how to obtain the current values of the symbolic
locations in Table 3.1. The free space (EndCode to StackEnd) can be manipulated as follows:
GetFixed(nwords) returns a pointer to a block of nwords words, or 0 if there isn’t
enough room. It won’t leave less than 100 words for the stack to
expand.
FreeFixed(pointer) frees a block provided by GetFixed.
FixedLeft() returns the size of the biggest block which GetFixed would be
willing to return.
SetEndCode(newValue) resets endCode explicitly. It is better to do this only when
endCode is being decreased.
The allocator is not very bright. FreeFixed decrements endCode if the block being returned is
immediately below the current endCode (it knows because GetFixed puts the length of the block in the
word preceding the first word of the block it returns; please do not rely on this, however, since there is no
guarantee that later allocators will use the same scheme). Otherwise it puts the block on a free list. When
another FreeFixed is done, any blocks on the free list which are now just below endCode will also be freed.
However, the allocator makes no attempt to allocate blocks from the free list.
3.7. The Alloc allocator
The operating system includes a copy of the Alloc package; documentation is contained in an appendix to
this manual.
InitializeZone(start, length, OutOfSpaceRoutine [...SysErr], MalFormedRoutine [...SysErr]) = a
"zone." These zones are compatible with the "zone" arguments
to operating system functions (e.g., sysZone). Allowing
MalFormedRoutine to default to SysErr causes a through check
of the zone data structures to be performed each time a block is
allocated or freed. To avoid this (considerable) overhead, pass a
zero for the MalFormedRoutine. The default sysZone has a
MalformedRoutine of SysErr.
AddToZone(zone, block, length) Adds block to the zone.
Allocate(zone, length, returnOnNoSpace [false], even [false]) = pointer to a block of length words
allocated from zone. If even is true, the pointer is guaranteed to
be a even number.
Free(zone, ptr) Returns the block pointed to by ptr to the zone.
CheckZone(zone) Performs a consistency check on the zone data structure.
Alto Operating System May 5, 1980 12
For Xerox Internal Use Only -- December 15, 1980