INTERFACE PagerObject;IMPORT VMError, VMTypes;
TYPEResultCode = {Success,AlreadyPagedIn,AlreadyPagedOut,PagerDestroyed,DeviceFull,NotImplemented};
PageNumber = VMTypes.PageNumber;PageCount = VMTypes.PageCount;
T <: Public;Public = OBJECTMETHODSinit(): T;
Called then the object is initialized. You may wonder why this proc doesn't take the size argument. The reason is that, the pager object is created using a way other than this initin most cases. For example, in case of bogopager or file pager, pager object is created usingDefaultPager.Create.
This, this procedure is a nop in most cases.
destroy();pageIn(offset: PageNumber; VAR data : ARRAY OF CHAR) : ResultCode;Bring in the page content.
pageOut(offset : PageNumber; READONLY data : ARRAY OF CHAR;dirty: BOOLEAN) : ResultCode;Write out the page content.
getMemoryObject(): REFANY;
Returns the memory object associated with the pager. The return value is always of type MemoryObject.T, but we declare it refany to avoid import loop. XXX is this safe?
info(offset: PageNumber; size: PageCount) : INTEGERRAISES {VMError.E};This is not used now.
print(): TEXT;END;
CONST Brand = "PagerObject-1.0";
END PagerObject.