/* Try to do the real allocation with a given size  */
static void * ent_alloc(lv_mem_ent_t *e, uint32_t size)
/* Try to do the real allocation with a given size  */
static void * ent_alloc(lv_mem_ent_t *e, uint32_t size)
{
    void * alloc = NULL;
    if(e->header.used == 0 && e->header.d_size >= size) {
        ent_trunc(e, size),
                  e->header.used = 1;
        alloc = &e->first_data;
    }
    return alloc;
}