lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] wrote:
Since the memory footprint was growing by at least 10 megabytes I
figured that the byte count was over the Threshold, but maybe
functions aren't counted in the byte count ? Anyway thanks for the
great help!! ( I'm using version 4.0.1 )

Lua parser (at least on my lua 4.x version) seems to
increase gc threshold on purpose after parsing some
new code.

from ldo.c:
  if (status == 0) {
    /* add new memory to threshold (as it probably will stay) */
    L->GCthreshold += (L->nblocks - old_blocks);

In the specific case you described this leads to
a leakage like behavior. I think forcing GC as
you now do is the correct fix.