Skip to content

Provide API to request memory from a specific block #92

@stefanct

Description

@stefanct

The library already supports multiple independent blocks of memory. In some systems it might be required to allocate certain buffers in specific locations. In my current use case I have an embedded system with various memories and a microcontroller with an a integrated USB controller. The latter interacts with the CPU via a (complicated) shared memory interface. Due to size constraints I have put the heap in an external memory (PSRAM) that is accessible to the CPU via normal load/store instructions but apparently not for the USB controller. However, the vendor library uses the heap to allocate buffers for USB transfers. (┛ಠ_ಠ)┛彡┻━┻

As of now, the project uses newlib and https://github.com/DRNadler/FreeRTOS_helpers/ but I might give implementing this in libmemory a shot if you think it is in scope. Any thoughts on the API very welcome. Another embedded allocator that supports this feature is https://github.com/MaJerle/lwmem

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