lua-users home
lua-l archive

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


Right but problem is that system free is not available /restricted and even if it is then it will lead to fragmentation. So i was thinking to manage the memory myself after system malloc. Just wanted to check if there is already allocator available ?
 

On Wed, Aug 2, 2017 at 4:47 PM, Dhaval Kapil <me@dhavalkapil.com> wrote:
Let me confess i am newbee on Lua and embedded. I am trying to port Lua on custom freertos running on CM4 and which does not have reallocation. is there any standard custom memory allocator available?

I understand that 'realloc' is unavailable on the custom freertos.

If you want a 'hack' to get it running, you could probably implement the 'realloc' function as a wrapper over 'malloc' and 'free'?

On Wed, Aug 2, 2017 at 4:39 PM, RAHUL KUMAR <ryadav.exe@gmail.com> wrote:
Let me confess i am newbee on Lua and embedded. I am trying to port Lua on custom freertos running on CM4 and which does not have reallocation. is there any standard custom memory allocator available?

I was thinking to request a bigger chunk of memory in one shot from the system and later custom allocator will keep allocating and free memory chunk from that. 

Looking forward to hear from you guys.

-Rahul



--
Dhaval Kapil