merge master
This commit is contained in:
@@ -103,6 +103,21 @@ void lv_mem_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up the memory buffer which frees all the allocated memories.
|
||||
* @note It work only if `LV_MEM_CUSTOM == 0`
|
||||
*/
|
||||
void lv_mem_deinit(void)
|
||||
{
|
||||
#if LV_MEM_CUSTOM == 0
|
||||
memset(work_mem, 0x00, (LV_MEM_SIZE / sizeof(MEM_UNIT)) * sizeof(MEM_UNIT));
|
||||
lv_mem_ent_t * full = (lv_mem_ent_t *)work_mem;
|
||||
full->header.s.used = 0;
|
||||
/*The total mem size id reduced by the first header and the close patterns */
|
||||
full->header.s.d_size = LV_MEM_SIZE - sizeof(lv_mem_header_t);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate a memory dynamically
|
||||
* @param size size of the memory to allocate in bytes
|
||||
|
||||
Reference in New Issue
Block a user