Re: LuaJIT out of memory when creating table with lot of keys

  • From: Kiswono Prayogo <kiswono@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 27 Feb 2015 09:54:29 +0700

This is quite common cases
<https://www.google.com/search?q=not+enough+memory+LuaJIT&safe=off>, I
believe this (limitation) should be on the FAQ <http://luajit.org/faq.html> or
the unofficial <http://www.luafaq.org/> one..
ah wait I found it on this link <http://luapower.com/luajit-notes.html>..

Or workaround (without ffi) would be nice.. for example
in Dart <http://www.dartlang.org> you can use --old_gen_heap_size=SIZE
or in Java <http://java.com> you can use -Xmx=SIZE
although I found those options are quite annoying when forced to a low
default value and sometimes useful when its optional..

On 27 February 2015 at 01:51, Florian Weimer <fw@xxxxxxxxxxxxx> wrote:

> * Kiswono Prayogo:
>
> > It seems LuaJIT has limited number of table keys?
>
> No, LuaJIT's heap size is just more limited than Lua's, especially on
> 64-bit architectures.  (Here it fails after allocating 1 GB of memory.)
>
>

Other related posts: