[luatex] Internet Explorer 6 leaks memory - a warning

Hans Hagen pragma at wxs.nl
Mon Jan 12 10:32:09 CET 2009


Jonathan Fine wrote:

> (To leak memory one in IE6 create a DOM object and a JavaScript object, 
> each of which references the other, and delete all other references to 
> these objects.  Then there is a garbage cycle, which neither memory 
> manager can detect.)

in luatex we have several persistant memory issues:

- until now luatex has some real leaks in math mode (solving this has 
been postponed till now i.e. when the math part is being redone); this 
concerned node memory that was not freed

- if one does a box copy the original list is still allocated, which 
(normally at the end of a run) results in some allocated node memory

- glue spec nodes are shared and are a pool (we might move this info the 
the glue nodes at some point)

- circular key/value references in lua tables might lead to not 
collected memory (but in most such cases it is intended anyway and 
harmless)

- concerning the interface: there is not much shared data between tex 
and lua in luatex, for instance when a font table is passed from lua to 
tex, at the tex end no references to the tables remain (data is moved to 
tex data structures) and it's up to the lua end then to keep track of 
the original table

- there are differences between operating systems with regards to the 
reported memory usage of lua (maybe due to subtle differences in garbage 
collection; in context we have some [visual] tracers for that kind of 
things and experiments have shown us that we can best not tweak the 
garbage collector)

anyhow, since a run with a more complex doc using a couple of open type 
fonts can easily take a few 100 meg of mem, a few meg more is rather 
harmless and normally a tex job comes to some end

Hans

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


More information about the luatex mailing list