Memory Divider X
MDX = malloc() + free() + Garbage Collection
 All Classes Namespaces Functions Variables
Public Member Functions
MemoryDividerX::MDXInterceptHandler Class Reference

Implement this interface to provide an intercept free callback. More...

List of all members.

Public Member Functions

virtual void mdxInterceptFree (MDXPool *pool, void *chunk, void *innerFreeParam, void *interceptParam)=0
 The intercept free callback itself.
virtual ~MDXInterceptHandler ()
 A virtual destructor, present only to avoid compiler warnings.

Detailed Description

Implement this interface to provide an intercept free callback.

Set an intercept free callback by setting MDXConfiguration::interceptHandler to point to an instance of MDXInterceptHandler.

Member Function Documentation

virtual void MemoryDividerX::MDXInterceptHandler::mdxInterceptFree ( MDXPool pool,
void *  chunk,
void *  innerFreeParam,
void *  interceptParam 
) [pure virtual]

The intercept free callback itself.

Use MDXPool::innerFree(void *innerFreeParam, void *chunk) and MDXPool::innerFree(void *innerFreeParam, uinta count, void **chunks) to free memory from inside the intercept free callback.

The intercept free callback must not allocate memory or change the settings of any block's flags,

poolThe address of the MDXPool object managing the memory having its freeing intercepted.
chunkThe address of the memory block having its freeing intercepted.
innerFreeParamThe value to pass for the innerFreeParam parameter when calling innerFree().
interceptParamThe value of MDXConfiguration::interceptParam from the pool's MDXConfiguration structure.
 All Classes Namespaces Functions Variables