Lines Matching refs:data_p
289 void * lv_mem_realloc(void * data_p, size_t new_size) in lv_mem_realloc() argument
301 if(data_p != NULL) { in lv_mem_realloc()
302 lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t)); in lv_mem_realloc()
304 data_p = NULL; in lv_mem_realloc()
308 uint32_t old_size = _lv_mem_get_size(data_p); in lv_mem_realloc()
309 if(old_size == new_size) return data_p; /*Also avoid reallocating the same memory*/ in lv_mem_realloc()
314 lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t)); in lv_mem_realloc()
327 if(data_p != NULL) { in lv_mem_realloc()
330 _lv_memcpy(new_p, data_p, LV_MATH_MIN(new_size, old_size)); in lv_mem_realloc()
331 lv_mem_free(data_p); in lv_mem_realloc()
341 void * lv_mem_realloc(void * data_p, size_t new_size) in lv_mem_realloc() argument
343 void * new_p = LV_MEM_CUSTOM_REALLOC(data_p, new_size); in lv_mem_realloc()