Out of memory error

I’m getting a [Error] (10.530, +10530) lv_obj_allocate_spec_attr: Asserted at expression: obj->spec_attr != NULL (Out of memory) (in lv_obj.c line #347)

I increased LV_MEM_SIZE in lv_conf.h and using mem_monitor to print out information on the memory usage however the total_size value differs from the LV_MEM_SIZE value I set.

I set LV_MEM_SIZE (1024U * 1024U) 1048576 bytes
but mem_mon.total_size = 262144 bytes

Why is there a discrepancy and does anyone have ideas for how to resolve this?