This is the mail archive of the cygwin-developers@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Just checked in a major change to cygwin


For the last several weeks, I've been working on giving cygwin it's own
"heap".  I use this heap to allocate memory that should be common to a
process's children.  This was one of the things that I desperately wanted
copy-on-write for but I ended up implementing my own crude version instead.

This means that cygwin can now pass the argv list from an exec to it's
child without attempting to quote it for Microsoft consumption.  We can
also just pass the environment almost "as-is".  Ditto for the current
working directory.  Ditto for the fd table.

This means that there should be fewer calls to the OS which should
translate into better performance.

I have noticed some modest performance improvement from this change but
I've also done one other thing.  A while ago I added an -X option to
the mount command.  So, if you do something like:

mount -X -b f:\cygwin\bin /bin

this will tell Cygwin that everything in /bin is an executable cygwin
program.  So Cygwin will make no attempt to set up commands and
environment variables for a normal Windows program.

This differs from:

mount -x -b f:\cygwin\bin /bin

in that the '-x' above only tells Cygwin that stuff in the directory
is executable.  This also should provide a small performance gain,
especially on samba drives.

You can also mark individual files as executable or cygwin-executable
by doing something like:

mount -X -b q:\perl\perl.exe

Anyway, this was a major change and I assume that there will be all
sorts of fallout from it.  Hopefully, the gain will be worth the pain.

I should note that a lot of the speed improvement comes from a malloc.c
implementation that DJ wrote.  I'd previously tried to use Microsoft's
Heap functions and was disappointed to notice that there was no discernible
improvement.  With DJ's malloc/realloc/free this all changed.

(Damn, I just did a clean build and cygwin is busted.  Oh well, I guess
I'll fix this tomorrow.)

cgf

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]