Skip to content

improve image_loader memory management by using WLED internal d_malloc() / p_malloc() #5086

@softhack007

Description

@softhack007

during engineering of #5040, we found that memory management in the gif loader could be improved, however this would need changes in the GifDecoder library.

  • create a PR for Aircoookie/GifDecoder:

    1. add return value to decoder.alloc(), for platforms that do not support exceptions. true=success, false=failed
    2. support a custom "malloc" callback function. This function gets the number of bytes as parameter, and it returns a pointer to the allocated memory. decoder.alloc() then constructs its internal "gif" object inside the provided memory block.
  • once we have support in GifDecoder, integrate WLED internal d_malloc() into image_loader.cpp.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions