LVGL Memory management

Which method is safe for lvgl’s memory management?
LV_MEM_CUSTOM == 0 or LV_MEM_CUSTOM == 1

Both are safe. One uses LVGL’s own heap implementation; the other relies on you providing heap functions that LVGL can use.

If you already have a system heap (e.g. on Linux) there is no need to use LVGL’s implementation.

Also, on embedded systems the LVGL allocator is sometimes better at avoiding fragmentation than what the platform provides.