lua-users home
lua-l archive

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


Saravanan Palanichami wrote:
> Hello,
>  I seem to have a problem with memory in lua ...
> 
> This piece of code seems suspect -->

<snip>

> a) This just runs a command on the lua state
> b) When I run this over and over again, if I look at the totalbytes
> field in the lua state, it grows slowly. It does not increase for every
> run but does it every 10 or maybe 20 calls.
> c) I am using LUA 5.1 on a fedora core 2 box.
> 
> Any help is appreciated ...

If you're using Linux, I highly recommend running your program through
Valgrind.  It will tell you precisely where you allocate the memory
that's being leaked, if any is, as well as numerous other handy checks.

My experience tells me that Lua does not leak when used correctly.

B.