[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to collect as much as possible with collectgarbage() ?
- From: Dirk Feytons <dirk.feytons@...>
- Date: Fri, 10 Jul 2009 14:01:11 +0200
On Fri, Jul 10, 2009 at 1:35 PM, Roberto
Ierusalimschy<roberto@inf.puc-rio.br> wrote:
>> So, I'd have to take care of issuing enough collectgarbage's after
>> reading large files or calling table.concat, right?
>
> Yes, if you really need all the memory back as soon as possible.
To make that a bit easier it would be nice if
collectgarbage("collect") returned how much memory it released.
On a related note, I've been wondering why collectgarbage("count")
returns the current memory use in kilobytes instead of bytes? When
using Lua with an integer core instead of floating point we're losing
some precision and on an embedded platform those small bytecounts are
significant.
--
Dirk