This is the mail archive of the cygwin-apps 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]
Other format: [Raw text]

[patch/rebase] rebaseall: Set default offset to 0


Hi Jason,


I just noticed that rebaseall still sets the default offset to 0x10000,
even though there's no reason to do that anymore.  The downside of this
ofset is that the virtual memory is potentially badly fragmented,
because there's a 64K hole between subsequent DLLs.

Background: There's a linked list in Cygwin keeping information about
loaded DLLs.  Up to 2009, the entries of the linked list were allocated
right after the DLL.  SInce every allocation takes one allocation
granularity slot, 64K, rebasing DLLs required to keep this extra 64K in
mind.  However, in 2009 the dll list has been moved into the cygheap.
There's no reason to stick to the 64K offset anymore and it only results
in the aforementioned fragmentation of the VM.

Therefore I propose to set the default offset to 0 in rebaseall.
Actually, I would rather remove the offset entirely, but it might
make sense in some crazy border case.

Ok to apply?


Thanks,
Corinna


Index: rebaseall.in
===================================================================
RCS file: /sourceware/projects/cygwin-apps-home/cvsfiles/rebase/rebaseall.in,v
retrieving revision 1.2
diff -u -p -r1.2 rebaseall.in
--- rebaseall.in	21 Jun 2011 15:40:10 -0000	1.2
+++ rebaseall.in	28 Jun 2011 16:29:06 -0000
@@ -1,7 +1,7 @@
 #!/bin/@ASH@
 
 #
-# Copyright (c) 2003, 2005, 2006, 2008 Jason Tishler
+# Copyright (c) 2003, 2005, 2006, 2008, 2011 Jason Tishler
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ PATH=$(cd $tp2 && pwd):@bindir@:/bin
 ProgramName=${0##*/}
 ProgramOptions='b:o:s:T:v'
 DefaultBaseAddress=0x70000000
-DefaultOffset=0x10000
+DefaultOffset=0
 DefaultVerbose=
 DefaultFileList=
 DefaultSuffixes='dll|so'



-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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