Mem_PoolBlkIxGet()

Gets index of a memory block in a memory pool.

This function is deprecated and will be removed in a future version of this product.

Files

lib_mem.h/lib_mem.c

Prototype

          void  Mem_PoolBlkIxGet (MEM_POOL  *pmem_pool,
                                  void      *pmem_blk,
                                  LIB_ERR   *perr);

Arguments

pmem_pool

Pointer to memory pool.

pmem_blk

Pointer to memory block to get index for.

perr

Pointer to variable that will receive the return error code from this function:

LIB_MEM_ERR_NONE
LIB_MEM_ERR_NULL_PTR
LIB_MEM_ERR_POOL_FULL
LIB_MEM_ERR_INVALID_POOL
LIB_MEM_ERR_INVALID_BLK_ADD
LIB_MEM_ERR_INVALID_BLK_ADDR_IN_POOL

Returned Value

Index of the memory block.

Required Configuration

Available only if LIB_MEM_CFG_HEAP_SIZE is > 0 in lib_cfg.h.

Notes / Warnings

None.