Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Gets a memory block from specified pool, growing it if needed. 

Files

lib_mem.h/lib_mem.c

Prototype

Arguments

p_pool

Pointer to pool data.

p_err

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_EMPTY

LIB_MEM_ERR_INVALID_MEM_ALIGN

LIB_MEM_ERR_INVALID_MEM_SIZE

LIB_MEM_ERR_NULL_PTR

LIB_MEM_ERR_SEG_OVF

Returned Value

Pointer to memory block, if successful.

DEF_NULL, otherwise.

Required Configuration

None.

Notes / Warnings

  1. If there is no block available in the pool when calling this function, it will attempt to allocate a new one on the pool segment.
  • No labels