lua-users home
lua-l archive

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


On 16/03/2012 14.13, Luiz Henrique de Figueiredo wrote:
See http://www.lua.org/source/5.2/lauxlib.c.html#l_alloc

So, as PiL says 'osize' is always valid, I guess adding this line at the top of a copy of l_alloc() should keep track of allocated memory, assuming allocations always succeed:

  currentlyAllocated += (nsize - osize);

Is that correct or are there caveats?

--
  Enrico