lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I have subscribed recently so not aware of previous discussions. If you can pull the old mailing list or conclusion that would be helpful :) 

Currently i have following options

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 6:19 PM, Ką Mykolas <kamicc@gmail.com> wrote:


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.