Implement this interface to provide a marking callback. More...
Public Member Functions | |
virtual void | mdxPerformMarking (MDXPool *pool, void *markingParam)=0 |
The marking callback itself. More... | |
virtual | ~MDXMarkingHandler () |
A virtual destructor, present only to avoid compiler warnings. | |
Implement this interface to provide a marking callback.
Set a marking callback by setting MDXConfiguration::markingHandler to point to an instance of MDXMarkingHandler.
|
pure virtual |
The marking callback itself.
Use MDXPool::mark(void *chunk) and MDXPool::mark(uinta count, void **chunks) to actually mark the wanted blocks. MDXPool::mark(void *chunk) also returns wether or not the block was already marked before it was called. Use MDXPool::isMarked(void *chunk), MDXPool::getFlags(void *chunk) or MDXPool::getFlags(uinta count, MDXFlags *flags) to determine whether or not a block's already been marked.
The marking callback must not allocate or free memory. Also it must not change the settings of any block's flags, except for FLAG_MARKED, which is set when a block is marked.
pool | The address of the MDXPool object managing the memory to be marked. |
markingParam | The value of MDXConfiguration::markingParam from the pool's MDXConfiguration structure. |