Skip to content

Memory sizing and checking on non-AVR platforms is off by 4x #374

@ccrawford

Description

@ccrawford

When using 32 bit platforms (RP Pico, ESP32) the memory checks in allocateMeme.cpp look at "elements" rather than "bytes". This works for the AVR platforms where we are using 8bit elements, but for 32bit platforms this results in 4 bytes being allocated with only 1 byte being available for use.

Could be fixed by passing the byte size, using compiler flags, or possibly by checking std::size_t .

Repro steps: Make a large community device. Note that the value for -DMEMLEN_CONFIG must be 4x the size required by the class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions