Large-Address awareness on 64 bit systems

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Sun Jun 19 07:25:00 GMT 2011


On Sat, 2011-06-18 at 22:17 +0200, Corinna Vinschen wrote:
> That means, if we make all Cygwin binaries large address aware, somebody
> using a 64 bit system could rebase all Cygwin DLLs, except for the
> Cygwin DLL itself into the virtual memory area beyond 0x80000000.  Given
> that this memory area is not at all used by Windows itself, it's free
> for usage by Cygwin alone.  This would affect the memory allocation not
> only for Cygwin DLLs, but also for mmaps and for thread stacks, which
> both use the MEM_TOP_DOWN flag.
> 
> If I get this right, this should ease the fork pain due to memory collisions
> on 64 bit systems quite a lot.

Sounds great.

> This obviously also affects all non-distro executables, such as self-
> compiled stuff.  All of them need the --bigaddr flag set, too.

It would be helpful if there were a short option for --bigaddr.

> Therefore it might be quite tricky to maintain a sane system, given that
> gcc creates executables with the large address awareness flag switched
> off, and given the fact that the flag is reset for a distro executable
> every time it gets updated via setup.

Are there any downsides to large address awareness, particularly for
32bit systems or those with less than 4GB?  IOW is there any reason not
to switch this on by default in gcc/ld?

> However, if anybody feels confident to test this on the own machine,
> I'd be curious if that has the desired effect of letting fork work
> more reliable.  I'm not sure I have the required use cases to test
> this sufficiently.

But I think I do. :-)  I have rebased and reflagged my system
accordingly, and so far (running GNOME 3 desktop) so good.  I'll keep
you posted.


Yaakov




More information about the Cygwin-developers mailing list