Tools.h++ Class Reference

Table Of Contents
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
RWVirtualPageHeap
Synopsis
Description
Persistence
Example
Public Constructor
Public Destructor
Public Member Functions
Public Pure Virtual Functions
Synopsis
#include <rw/vpage.h>
(Abstract base class)
Description
This is an abstract base class representing an abstract page heap of fixed sized pages. The
following describes the model by which specializing classes of this class are expected to work.
You allocate a page off the abstract heap by calling member function allocate() which will
return a memory "handle," an object of type RWHandle. This handle logically represents the
page.
In order to use the page it must first be "locked" by calling member function lock() with the
handle as an argument. It is the job of the specializing class of RWVirtualPageHeap to make
whatever arrangements are necessary to swap in the page associated with the handle and bring it
into physical memory. The actual swapping medium could be disk, expanded or extended
memory, or a machine someplace on a network. Upon return, lock() returns a pointer to the
page, now residing in memory.
Once a page is in memory, you are free to do anything you want with it although if you change
the contents, you must call member function dirty() before unlocking the page.