Function mpool_ref_query

Function Documentation

int mpool_ref_query(struct mpool *the_pool, const void *ptr)

Get the index of the reference count (not the reference count)

Note

The returned value cannot be relied upon in concurrent contexts without additional synchronization.

Parameters:
  • the_pool – The mpool handle.

  • ptr – The chunk to query.

Returns:

The reference index, or -1 if does not exist.