LittlevGL  3.20.00.19
Data Structures | Macros | Functions
lv_mem.h File Reference
#include "../../../lv_conf.h"
#include <stdint.h>
#include <stddef.h>
#include "lv_log.h"
Include dependency graph for lv_mem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lv_mem_monitor_t
 

Macros

#define lv_mem_assert(p)
 

Functions

void lv_mem_init (void)
 
void * lv_mem_alloc (uint32_t size)
 
void lv_mem_free (const void *data)
 
void * lv_mem_realloc (void *data_p, uint32_t new_size)
 
void lv_mem_defrag (void)
 
void lv_mem_monitor (lv_mem_monitor_t *mon_p)
 
uint32_t lv_mem_get_size (const void *data)
 

Macro Definition Documentation

§ lv_mem_assert

#define lv_mem_assert (   p)
Value:
{ \
if(p == NULL) \
while(1) \
; \
}

Halt on NULL pointer p pointer to a memory

Function Documentation

§ lv_mem_init()

void lv_mem_init ( void  )

Initiaize the dyn_mem module (work memory and other variables)

§ lv_mem_alloc()

void* lv_mem_alloc ( uint32_t  size)

Allocate a memory dynamically

Parameters
sizesize of the memory to allocate in bytes
Returns
pointer to the allocated memory

§ lv_mem_free()

void lv_mem_free ( const void *  data)

Free an allocated data

Parameters
datapointer to an allocated memory

§ lv_mem_realloc()

void* lv_mem_realloc ( void *  data_p,
uint32_t  new_size 
)

Reallocate a memory with a new size. The old content will be kept.

Parameters
datapointer to an allocated memory. Its content will be copied to the new memory block and freed
new_sizethe desired new size in byte
Returns
pointer to the new memory

§ lv_mem_defrag()

void lv_mem_defrag ( void  )

Join the adjacent free memory blocks

§ lv_mem_monitor()

void lv_mem_monitor ( lv_mem_monitor_t mon_p)

Give information about the work memory of dynamic allocation

Parameters
mon_ppointer to a dm_mon_p variable, the result of the analysis will be stored here

§ lv_mem_get_size()

uint32_t lv_mem_get_size ( const void *  data)

Give the size of an allocated memory

Parameters
datapointer to an allocated memory
Returns
the size of data memory in bytes
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale