Pool allocation API functions

Notes:

void purify_set_pool_id  (char  *mem,  int id)

Sets the pool id for the pool of the specified memory mem to id.

int  purify_get_pool_id  (char  *mem)

Returns the pool id associated with pool of memory mem.

void  purify_set_user_data  (char  *mem, void *data)

Sets the auxiliary user data associated with the pool of memory mem to data.

void*  purify_get_user_data  (char *mem)

Returns a pointer to the auxiliary user data associated with the pool of memory mem.

void  purify_map_pool 
(int id,  void (*fn) (char *mem, int size, void *data))

Applies the function fn to all members of the pool of memory identified by pool-id id. The arguments to the function fn are the memory pointer (mem), the size of the memory (size), and the auxiliary user data associated with the pool (data).

void purify_map_pool_id  (void (*fn) (int id))

Applies the function fn to each pool id known to the system.