Tools.h++ Class Reference

Table Of Contents
Public Constructor
RWVirtualPageHeap(unsigned pgsize);
Sets the size of a page.
Public Destructor
virtual ~RWVirtualPageHeap();
The destructor has been made virtual to give specializing classes a chance to deallocate
any resources that they may have allocated.
Public Member Functions
unsigned
pageSize() const;
Returns the page size for this abstract page heap.
Public Pure Virtual Functions
virtual RWHandle
allocate() = 0
Allocates a page off the abstract heap and returns a handle for it. If the specializing class
is unable to honor the request, then it should return a zero handle.
virtual void
deallocate(RWHandle h) = 0;
Deallocate the page associated with handle h. It is not an error to deallocate a zero
handle.
virtual void
dirty(RWHandle h) = 0;
Declare the page associated with handle h to be "dirty." That is, it has changed since it
was last locked. The page must be locked before calling this function.
virtual void*
lock(RWHandle h) = 0;
Lock the page, swapping it into physical memory, and return an address for it. A nil
pointer will be returned if the specializing class is unable to honor the lock. The returned
pointer should be regarded as pointing to a buffer of the page size.
virtual void
unlock(RWHandle h) = 0;
Unlock a page. A page must be locked before calling this function. After calling this