VMChunks: CEDAR DEFINITIONS ~ BEGIN Domain: TYPE = REF DomainRep; DomainRep: TYPE; Chunk: TYPE = REF ChunkRep; ChunkRep: TYPE; CreateDomain: PROC [startAddress: CARD, size: CARD] RETURNS [Domain]; IsChunk: PROC [x: REF ANY] RETURNS [BOOL]; NarrowChunk: PROC [x: REF ANY] RETURNS [Chunk]; AllocateChunk: PROC [domain: Domain, size: CARD] RETURNS [Chunk]; AddressOfChunk: PROC [chunk: Chunk] RETURNS [CARD]; SizeOfChunk: PROC [chunk: Chunk] RETURNS [CARD]; DomainOfChunk: PROC [chunk: Chunk] RETURNS [Domain]; END. „ VMChunks.mesa Copyright ำ 1990, 1991 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, February 7, 1990 Christian Jacobi, February 8, 1990 "Large grain storage manager" A good storage manager could use the storage itself for managing the free list; this package does never touch the "memory", to reduce damage on erronous out of boundary writing by clients. Chunks are subject to garbage collection: When a chunk is collected, the allocated "memory" is reused. AddressOfChunk will follow alignment conditions of processor. Returns new domain x#NIL AND ISTYPE[x, Chunk] NARROW[x, Chunk] Returns newly allocates chunk of required size or NIL, if not enough free memory in domain. Returns address of data denoted by chunk. Data must not be used after chunk is garbage collected. Returns size of allocated data for chunk. Returns domain where chunk belongs to. สา•NewlineDelimiter –(cedarcode) style™šœ ™ Icodešœ ฯeœ7™BKšœ-™-Kšœ"™"K™—KšฯnœฯkœŸ ˜KšœŸ˜K™™K™K™พ—K™šœŸœŸœ ˜Kšœ Ÿœ˜—K˜šœŸœŸœ ˜Kšœ Ÿœ˜Kšœh™hKšœ=™=—K˜š ž œŸœŸœŸœŸœ ˜EK™—K˜š žœŸœŸœŸœŸœŸœ˜*Kšœ™K™—š ž œŸœŸœŸœŸœ ˜/Kšœ™—K˜šž œŸœŸœŸœ ˜AK™[K™—šžœŸœŸœŸœ˜3K™)Kšœ7™7K™—šž œŸœŸœŸœ˜0K™)K™—šž œŸœŸœ ˜4Kšœ&™&—K˜KšŸœ˜K˜K˜—…— `