embeddedartistry / embeddedartistry/libmemory

Provide API to request memory from a specific block

Open
#92 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
285
Forks
53
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.