Re: A few questions about memory allocation
"'Sewbacca' via lua-l" <[email protected]>
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
On 2/20/2026 10:36 PM, Javier Guerra Giraldez wrote: > > or you could replace the allocator used by Lua with a thin wrapper to > malloc that uses an arena for small objects. i guess some of the many > "high performance" allocators do that in very sophisticated ways. I suppose I could. What I don't like about this solution is that it doesn't work as an addon (as a C module). You would need to control the whole application flow for that (I suppose you could exchange the allocator function midway through, but that seems on another level of complexity). In C one would simply allocate an arena and return pointers to objects residing in it, but that would require Lua to handle small sized userdata differently. ~ Sewbacca -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/cb1134e2-c5aa-44e4-ba81-1e72a96fff84%40kolabnow.com.