[tex-live] LuaTeX cygwin build

Ken Brown kbrow1i at gmail.com
Fri Jun 11 19:16:46 CEST 2010


On 6/11/2010 1:08 PM, taco wrote:
> Ken Brown wrote:
>> On 4/8/2010 8:31 AM, Élie Roux wrote:
>>> Hello,
>>>
>>> If I test the LuaTeX 0.60 for mingw32 that I can get on
>>> http://foundry.supelec.fr/gf/project/luatex/frs/, everything is doing
>>> fine, but if I compile my own binary under cygwin, for documents using
>>> a lot of big fonts, I easily run out of memory. I don't think it's a
>>> big deal as I can use mingw32 binaries under cygwin without any
>>> problem, but I think it would be worth documenting it for TeX Live's
>>> cygwin distribution (if binaries are built under cygwin).
>>
>> Hi Élie,
>>
>> I'm returning to this old thread because I've just learned, as a
>> result of discussions involving asymptote, that it is sometimes
>> possible to increase the amount of memory available to a cygwin
>> process. Instructions are at
>>
>> http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html
>>
>> Do you want to try this and see if it helps? Alternatively, I would be
>> glad to try it in TL2010 (pretest) if you send me detailed instructions.
>
> It would be really interesting to me if someone could explain *why*
> the cygwin binaries need more memory than either the mingw32 or the
> native msvc builds.

Here's my understanding.  I might have some details wrong.  Windows 
binaries (including Cygwin binaries) have a limit of 2GB addressable 
(virtual) memory in user space [as opposed to kernel space].  For a 
Cygwin binary, the Cygwin dll itself takes up some of that space, as do 
other dll's that might have to be loaded.  Cygwin starts off with a 
fixed-size heap that uses another chunk of that memory, and this is 
where its malloc gets memory requested by processes.  Cygwin's heap can 
be enlarged dynamically provided it doesn't run into other memory 
already allocated by Windows.

The initial fixed-size heap is enough for most users.  The Cygwin 
documentation that I cited above explains how users can increase the 
initial size if they need to.

Ken


More information about the tex-live mailing list