|
1. dlmalloc(http://g.oswego.edu/dl/html/malloc.html)
2. K &R ( like https://github.com/BoiseState/CS453-resources/tree/master/examples/memory-management/simple-malloc)
3. uClibc (https://github.com/kraj/uClibc/blob/master/libc/stdlib/malloc/malloc.h)
4. last not the least the OpenRTOS malloc implemenation (http://www.freertos.org/a00111.html#heap_5)
Not sure which one to start with.
On Wed, Aug 2, 2017 at 2:51 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:You'll have to adapt morecore to your needs: for instance, by replacing sbrk.I guess, this problem was already discussed in this mailling list at least couple of times :}
I'd like to expand on that a little bit. In general, You'll have to deal with linker scripts and mapping properly the RAM.
Also, there are plenty of MCUs with terribly segmented RAM, in chunks of 16-32 whatever kbytes. Which... makes
sbrk() implementation a bit tricky.
All in all, that's the generic way dealing with more or less custom or just various embedded devices like ARM boards.