public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Process map and fork problems
Date: Wed, 20 Apr 2016 11:15:00 -0000	[thread overview]
Message-ID: <20160420111431.GB13570@calimero.vinschen.de> (raw)
In-Reply-To: <loom.20160420T124825-644@post.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2404 bytes --]

On Apr 20 11:01, Achim Gratz wrote:
> Corinna Vinschen <corinna-cygwin <at> cygwin.com> 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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-04-20 11:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 10:38 Achim Gratz
2016-04-20 10:46 ` Achim Gratz
2016-04-20 10:50 ` Corinna Vinschen
2016-04-20 11:01   ` Corinna Vinschen
2016-04-20 11:14   ` Achim Gratz
2016-04-20 11:15     ` Corinna Vinschen [this message]
2016-04-20 11:56       ` Achim Gratz
2016-04-20 14:20         ` Corinna Vinschen
2016-04-20 14:40           ` Achim Gratz
2016-04-20 14:52             ` Corinna Vinschen
2016-04-20 15:01               ` Achim Gratz
2016-04-20 13:06     ` Marco Atzeri
2016-04-22 12:12       ` Achim Gratz
2016-04-22 12:41         ` Marco Atzeri
2016-04-22 13:23           ` Achim Gratz
2016-04-22 14:20             ` Achim Gratz
2016-04-22 17:41               ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160420111431.GB13570@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).