21 if (bytes == 0)
return nullptr;
53 return this == &other;
virtual bool do_is_equal(const memory_resource &other) const FL_NO_EXCEPT
virtual void do_deallocate(void *p, fl::size bytes) FL_NO_EXCEPT=0
bool is_equal(const memory_resource &other) const FL_NO_EXCEPT
void deallocate(void *p, fl::size bytes) FL_NO_EXCEPT
virtual ~memory_resource() FL_NO_EXCEPT=default
void * reallocate(void *p, fl::size old_bytes, fl::size new_bytes) FL_NO_EXCEPT
Try to resize in-place.
virtual void * do_allocate(fl::size bytes) FL_NO_EXCEPT=0
virtual void * do_reallocate(void *p, fl::size old_bytes, fl::size new_bytes) FL_NO_EXCEPT
Default: returns nullptr (not supported). Override for realloc-capable resources.
void * allocate(fl::size bytes) FL_NO_EXCEPT
Polymorphic memory resource base class (PMR-style).
u8 u8 fract8 blur_amount FL_NO_EXCEPT
memory_resource * default_memory_resource() FL_NO_EXCEPT
Get the default memory resource (wraps fl::Malloc / fl::Free / fl::realloc).
memory_resource * psram_memory_resource() FL_NO_EXCEPT
Get the PSRAM memory resource (wraps PSRamAllocate / PSRamDeallocate).
Base definition for an LED controller.