This is the mail archive of the cygwin 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]

Re: Process map and fork problems

On Apr 20 11:01, Achim Gratz wrote:
> Corinna Vinschen <corinna-cygwin <at>> writes:
> > This is one heap.  The first region is just the already committed
> > part, the remainder is the reserved part.
> > 
> > THis is the standard Cygwin heap area on 32 bit machines, which always
> > starts at 0x20000000.
> So, shouldn't rebase keep this area clear on these machines?
> > On 64 bit systems, 32 bit applications have a 4 Gig virtual address
> > space.  On 32 bit systems, procecces only have a 2 Gig virtual address
> > space, unless the /3gb kernel option is given.
> OK.  On Windows7 that means 'BCDedit /set increaseuserva=3072', right?

Yeah, I think so.  /3gb is the old XP way to define it.

> I think all the affected machines have 4GB memory installed, but the
> option may not have been default when they were installed.

They never are default.  Default is 2 Gigs application VM, 2 Gigs
kernelÌ memory space.  Specifying /3Gb means 3 Gigs application VM
vs. 1 Gig kernelÌ memory space.  That's not always a good thing
since it could lead to kernel memory pool exhaustion.

> > On 64 bit systems and on /3gb enabled 32 bit systems, the heap of 32 bit
> > Cygwin processes always starts at 0x80000000L.
> >
> > Since that isn't available on 32 bit systems by default, the heap has
> > to start within the lower 2 Gigs.  That's where the 0x2000000 address
> > comes from.
> With /3GB you mean 4GT (aka PAE), right?  And 32bit is without PAE?

No, PAE works differently, using different calls.  I'm talking abut
the normal 32 bit address space of a 32 bit CPU.

> > If you have collisions because you're providing too many Cygwin DLLs,
> > you have to tweak these installations manually.
> As long as Cygwin determines automatically where the heap is located, then
> rebase should take care of that.  It already knows to skip the cygwin1.dll
> address range, how would it ask for the heap location?

It can only know its own heap.  But keep in mind that the heap can
be differently sized in different applications.  The heap only *starts*
as a 384Meg heap, it could easly grow in big apps (gcc, emacs, ...)
when calling sbrk.

Patches welcome, of course.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature

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