Re: VM/GC question for gurus.
Francisco Olarte <[email protected]>
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <CA+bJJbzsp3kzbt7JFJNZfRRPrjm7G-KA5As+_-D60udMeyLJoA@mail.gmail.com> |
On Wed, 18 Mar 2026 at 18:28, Roberto Ierusalimschy <[email protected]> wrote: > > > I do not mean it does not account it, I know it does. I mean it does not > > notice the memory usage has grown a lot due to the function being loaded, > ... > You may be right; we will check that. luaL_loadfilex creates a new > string with the file name (calling 'lua_pushfstring'), and that call > checks the collector. But lua_load does not do that check. > Will calling lua_gc(L, LUAGC_STEP, st.st_size /* This is the buffer size */ ) after successful loadbufferX be adequate as a contention measure? Or maybe just doing lua_createtable(L,0,0) ? ( I am not sure of a constant string, I think interning may skip string creation and checks ) Although it does only show up in tests/benchmarks in an artificially memory low VM I would prefer to plug the hole. Francisco Olarte. > > -- Roberto > > -- > 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/20260318172850.GA71584%40arraial.inf.puc-rio.br > . > -- 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/CA%2BbJJbzsp3kzbt7JFJNZfRRPrjm7G-KA5As%2B_-D60udMeyLJoA%40mail.gmail.com.