Re: [ANN] luaffi 1.0-work1

  • From: James McKaskill <james@xxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 16 May 2012 21:52:05 -0400

On Wed, May 16, 2012 at 7:12 PM, James Graves
<james.c.graves.jr@xxxxxxxxx> wrote:
> 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.

Well that is indeed odd... Lua 5.1 runs fine (albeit slowly) whilst
using between 700-1600

Thanks for the report

-- James

Other related posts: