[Dev-luatex] luajit memory limit

Hans Hagen pragma at wxs.nl
Sun Oct 2 11:59:48 CEST 2016


On 10/1/2016 10:15 PM, Reinhard Kotucha wrote:
> Hi,
> first of all, thank you very much for LuaTeX Version 1.0.
>
> However, when I load a complete file into memory
>
> ---- testmen.lua -----------------
>   local file=arg[1]
>
>   fd=io.open(file, "r")
>   local t = fd:read("*a")
>   fd:close()
> ----------------------------------
>
> I get
>
>   $ texlua testmem.lua f_256MiB
>   $ luajittex --luaonly testmem.lua f_256MiB
>   $ texlua testmem.lua f_512MiB
>   $ luajittex --luaonly testmem.lua f_512MiB
>   not enough memory
>
> It seems that luajit limits the size of a file being read for some
> reason.  I'm puzzled because I do not see any relationship between
> loading a file into memory and just-in-time compilation.
>
> Is it possible to increase this limit, at least?  It would be nice if
> everything which can be done with luatex could be done with luajittex
> as well.

There are more limitations in luajit due to the different implementation 
of the vm (one reason why it's faster). You will hit these with large 
data sets, so you can only use luajittex in well known situations (which 
is the majority).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-luatex mailing list