lua-users home
lua-l archive

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


On Mon, Apr 21, 2014 at 4:07 PM, Andrew Starks <andrew.starks@trms.com> wrote:
> On Mon, Apr 21, 2014 at 11:59 AM, Andrew Starks <andrew.starks@trms.com> wrote:
> <self snip>
>> So, I'm sure I'm overcomplicating things, but can anyone see through
>> to what might be the issue?

I may be misreading the situation, but it sounded like you have a
large (huge?) number of hash slots allocated, perhaps in the
references table? These will linger even once nil'd out[1]. I haven't
run afoul of it myself, where I might be able to suggest a remedy (I
vaguely recall something like triggering a resize in the array part?),
but I know this has come up in the past on this list. This would apply
if repeated collectgarbage() did nothing to budge the count, anyway,
although your last message also suggests the collector is simply less
aggressive than you originally assumed.

[1] - From which follows, ostensibly, this benefit / caveat for next
and pairs: "The behavior of next is undefined if, during the
traversal, you assign any value to a non-existent field in the table.
You may however modify existing fields. In particular, you may clear
existing fields."