lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:
>> Could this extreme "chunkiness" of allocation have some adverse impact
>> on 5.2 that it didn't on 5.1.4?
>
> Can you send the code?

Hmm, OK, download these files (probably need about 1GB+ of disk space
with everything unpacked):

   https://github.com/downloads/snogglethorpe/snogray/snogray-0.5.2-86-g0a16df5-gc-debug-20120401-0.tar.gz
   https://github.com/downloads/snogglethorpe/snogray/gc-debug-pbrt-scene-sanmiguel.tar.gz

[Please tell me when you've downloaded these, because I want to delete
the huge scene tarball...]


Then:

(1) Unpack tarballs:

   $ tar xzf snogray-0.5.2-86-g0a16df5-gc-debug-20120401-0.tar.gz 
   $ tar xzf gc-debug-pbrt-scene-sanmiguel.tar.gz 

(2) Configure, explicitly giving it a Lua source tree to compile from:

   $ cd snogray-0.5.2-86-g0a16df5-gc-debug-20120401-0
   $ ./configure --with-lua-src=/usr/local/src/lua-5.2.0
   ...

(3) Make sure the SWIG interface isn't regenerated, because current
    versions of SWIG don't support Lua 5.2[*]:

   $ touch snograw_lua_wrap.cc 

(4) Build
    
   $ make 
   ...

(5) Run it on the accompanying scene file, using the "--no-force-gc"
    option to prevent the loader from calling collectgarbage.
    [Additional options that affect GC usage are "--gc-stemul=SETMUL"
    and "--gc-pause=PAUSE"]:

   $ ./snogray --no-force-gc -n1 -s100 -Spath /usr/local/pbrt-scenes/sanmiguel_cam14.pbrt /tmp/xx0.tga
   * force-gc disabled
   * gc params: stepmul = 200, pause = 200
   * verify gc params: stepmul = 200, pause = 200
   * loading scene file "/usr/local/pbrt-scenes/sanmiguel_cam14.pbrt"
   * current Lua memory usage: 0.4 MB
   ...


[*] Hopefully the next release of SWIG will support Lua 5.2; the patch
exists, but hasn't been committed yet.

-Miles

-- 
A zen-buddhist walked into a pizza shop and
said, "Make me one with everything."