| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
lib_mem.c File Reference
`#include <lib_mem.h>`

Go to the source code of this file.

## Macros
#define | LIB_MEM_MODULE

## Functions
static CPU_BOOLEAN | Mem_PoolBlkIsValidAddr (MEM_POOL *pmem_pool, void *pmem_blk)
static CPU_SIZE_T | Mem_PoolSegCalcTotSize (void *pmem_addr, CPU_SIZE_T blk_nbr, CPU_SIZE_T blk_size, CPU_SIZE_T blk_align)
static void * | Mem_PoolSegAlloc (MEM_POOL *pmem_pool, CPU_SIZE_T size, CPU_SIZE_T align)
void | Mem_Init (void)
void | Mem_Clr (void *pmem, CPU_SIZE_T size)
void | Mem_Set (void *pmem, CPU_INT08U data_val, CPU_SIZE_T size)
CPU_BOOLEAN | Mem_Cmp (const void *p1_mem, const void *p2_mem, CPU_SIZE_T size)
void * | Mem_HeapAlloc (CPU_SIZE_T size, CPU_SIZE_T align, CPU_SIZE_T *poctets_reqd, LIB_ERR *perr)
void | Mem_PoolClr (MEM_POOL *pmem_pool, LIB_ERR *perr)
void | Mem_PoolCreate (MEM_POOL *pmem_pool, void *pmem_base_addr, CPU_SIZE_T mem_size, CPU_SIZE_T blk_nbr, CPU_SIZE_T blk_size, CPU_SIZE_T blk_align, CPU_SIZE_T *poctets_reqd, LIB_ERR *perr)
void * | Mem_PoolBlkGet (MEM_POOL *pmem_pool, CPU_SIZE_T size, LIB_ERR *perr)
void | Mem_PoolBlkFree (MEM_POOL *pmem_pool, void *pmem_blk, LIB_ERR *perr)

## Variables
MEM_POOL * | Mem_PoolTbl
MEM_POOL | Mem_PoolHeap
CPU_INT08U | Mem_Heap [LIB_MEM_CFG_HEAP_SIZE]

## Macro Definition Documentation

#define LIB_MEM_MODULE

Definition at line 56 of file lib_mem.c.

## Function Documentation

void Mem_Clr | ( | void * | pmem,
|  | CPU_SIZE_T | size
| ) |  |

Definition at line 218 of file lib_mem.c.

CPU_BOOLEAN Mem_Cmp | ( | const void * | p1_mem,
|  | const void * | p2_mem,
|  | CPU_SIZE_T | size
| ) |  |

Definition at line 464 of file lib_mem.c.

void* Mem_HeapAlloc | ( | CPU_SIZE_T | size,
|  | CPU_SIZE_T | align,
|  | CPU_SIZE_T * | poctets_reqd,
|  | LIB_ERR * | perr
| ) |  |

Definition at line 592 of file lib_mem.c.

void Mem_Init | ( | void |  | ) |

Definition at line 159 of file lib_mem.c.

void Mem_PoolBlkFree | ( | MEM_POOL * | pmem_pool,
|  | void * | pmem_blk,
|  | LIB_ERR * | perr
| ) |  |

Definition at line 1390 of file lib_mem.c.

void* Mem_PoolBlkGet | ( | MEM_POOL * | pmem_pool,
|  | CPU_SIZE_T | size,
|  | LIB_ERR * | perr
| ) |  |

Definition at line 1287 of file lib_mem.c.

static CPU_BOOLEAN Mem_PoolBlkIsValidAddr | ( | MEM_POOL * | pmem_pool,
|  | void * | pmem_blk
| ) |  |
| static

Definition at line 1495 of file lib_mem.c.

void Mem_PoolClr | ( | MEM_POOL * | pmem_pool,
|  | LIB_ERR * | perr
| ) |  |

Definition at line 707 of file lib_mem.c.

void Mem_PoolCreate | ( | MEM_POOL * | pmem_pool,
|  | void * | pmem_base_addr,
|  | CPU_SIZE_T | mem_size,
|  | CPU_SIZE_T | blk_nbr,
|  | CPU_SIZE_T | blk_size,
|  | CPU_SIZE_T | blk_align,
|  | CPU_SIZE_T * | poctets_reqd,
|  | LIB_ERR * | perr
| ) |  |

Definition at line 901 of file lib_mem.c.

static void * Mem_PoolSegAlloc | ( | MEM_POOL * | pmem_pool,
|  | CPU_SIZE_T | size,
|  | CPU_SIZE_T | align
| ) |  |
| static

Definition at line 1755 of file lib_mem.c.

static CPU_SIZE_T Mem_PoolSegCalcTotSize | ( | void * | pmem_addr,
|  | CPU_SIZE_T | blk_nbr,
|  | CPU_SIZE_T | blk_size,
|  | CPU_SIZE_T | blk_align
| ) |  |
| static

Definition at line 1647 of file lib_mem.c.

void Mem_Set | ( | void * | pmem,
|  | CPU_INT08U | data_val,
|  | CPU_SIZE_T | size
| ) |  |

Definition at line 262 of file lib_mem.c.

## Variable Documentation

CPU_INT08U Mem_Heap[LIB_MEM_CFG_HEAP_SIZE]

Definition at line 100 of file lib_mem.c.

MEM_POOL Mem_PoolHeap

Definition at line 97 of file lib_mem.c.

MEM_POOL* Mem_PoolTbl

Definition at line 96 of file lib_mem.c.