PagerObject

INTERFACE PagerObject;
IMPORT VMError, VMTypes;

TYPE
  ResultCode = {Success,
                AlreadyPagedIn,
                AlreadyPagedOut,
                PagerDestroyed,
                DeviceFull,
                NotImplemented};
  PageNumber = VMTypes.PageNumber;
  PageCount = VMTypes.PageCount;
  T <: Public;
  Public = OBJECT
  METHODS
    init(): 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 init in most cases. For example, in case of bogopager or file pager, pager object is created using DefaultPager.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) : INTEGER
                RAISES {VMError.E};
    This is not used now.
    print(): TEXT;
  END;
CONST Brand = "PagerObject-1.0";
END PagerObject.

Last updated: Sun Oct 13 16:36:49 PDT 1996
Stefan Savage (savage@cs.washington.edu)