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