Re: Invalidate / GC-marking after close of large data blocks
bil til <[email protected]>
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <CAOnDXmGEBP7sooDBnPY-ZH=XDspkL2NimNTNkONOqe45EUvg4A@mail.gmail.com> |
> I think you should use a pointer to your data in your userdata in this case. > Then you can free the large block of data (and null the pointer) when the userdata is closed instead of freeing it when it is collected. Hi Thomas, thanks for answer, but this is not possible. This is for a very constrained RAM application in a 1-Chip Microcontroller system. Usually in such a system I would not use dynamic RAM - all memory would be static. For Lua dynamic RAM of course is necessary - but in this application then ALL dynamic RAM is operated by Lua - alloc / free is only done by Lua... . -- 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/CAOnDXmGEBP7sooDBnPY-ZH%3DXDspkL2NimNTNkONOqe45EUvg4A%40mail.gmail.com.