Re: [ANN] luaffi 1.0-work1

  • From: James Graves <james.c.graves.jr@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 16 May 2012 18:12:54 -0500

Hi All,

I was trying out luaffi on my Ubuntu 12.04 64-bit VM with 1.5GB of RAM.

I tried out the greyscale conversion example code on the FFI introduction page:

http://luajit.org/ext_ffi.html

However, using luaffi with Lua 5.2.0, the program runs out of memory
before finishing the loop.

Running it with a collectgarbage("count") shows the memory usage
steadily going up with each iteration, and top reports similar
results.  When run with LuaJIT, the memory usage is steady at less
than 700Kbytes for the entire run.

If I insert a collectgarbage("collect") to run a full collection in
the loop, then it is fine.

James Graves

Other related posts: