Tools.h++ Manual

104011 Tandem Computers Incorporated 21-195
21
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;
Dallocate 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 function the address returned by
lock()
is no longer valid.