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. Regards, Reinhard P.S.: Creation of test files (content doesn't matter): dd if=/dev/zero of=./f_256MiB bs=1048576 count=256 dd if=/dev/zero of=./f_512MiB bs=1048576 count=512 -- ------------------------------------------------------------------ Reinhard Kotucha Phone: +49-511-3373112 Marschnerstr. 25 D-30167 Hannover mailto:reinhard.kotucha@web.de ------------------------------------------------------------------
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Reinhard Kotucha