Function mpool_ref_add

Function Documentation

status_t mpool_ref_add(struct mpool *the_pool, const void *ptr)

Increment ref count for a previously allocated chunk in a mpool.

This function is useful if a thread/module wants to give a non-owning reference to a chunk of memory to another thread/module.

Parameters:
  • the_pool – The mpool handle.

  • ptr – The chunk to add a reference to.

Returns:

status_t.