lua-users home
lua-l archive

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


On 02-Aug-17 17:57, RAHUL KUMAR wrote:
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.

Not sure if it would be the best choice in this case, but there is also TLSF (Two-Level Segregate Fit), a bounded-time allocator useful in time- and/or resource-constrained systems. I used version 1.9 to manage 1 MB of RAM and it worked very well with Lua:

http://www.gii.upv.es/tlsf/

If you search the Lua-list archives looking for "tlsf" and my name, you should find a few precious hints I got from Luiz and/or Roberto.

--
  Enrico