#include "../../../lv_conf.h"
#include <stdint.h>
#include <stddef.h>
#include "lv_log.h"
Go to the source code of this file.
§ lv_mem_assert
| #define lv_mem_assert |
( |
|
p | ) |
|
Value:{ \
if(p == NULL) \
while(1) \
; \
}
Halt on NULL pointer p pointer to a memory
§ 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
-
| size | size 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
-
| data | pointer 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
-
| data | pointer to an allocated memory. Its content will be copied to the new memory block and freed |
| new_size | the 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()
Give information about the work memory of dynamic allocation
- Parameters
-
| mon_p | pointer 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
-
| data | pointer to an allocated memory |
- Returns
- the size of data memory in bytes