public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Paul Sargent <Paul.Sargent@3dlabs.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2GB process crashing on 2.4.14
Date: 07 Dec 2001 15:02:46 +0100	[thread overview]
Message-ID: <p73k7vz6sc9.fsf@amdsim2.suse.de> (raw)
In-Reply-To: <20011207125821.D31161@3dlabs.com.suse.lists.linux.kernel> <E16CKrx-0005nL-00@the-village.bc.nu.suse.lists.linux.kernel> <20011207132317.E31161@3dlabs.com.suse.lists.linux.kernel>
In-Reply-To: Paul Sargent's message of "7 Dec 2001 14:27:04 +0100"

Paul Sargent <Paul.Sargent@3dlabs.com> writes:


> So if I was hitting this limit then I should see no / very few gaps, in the
> /proc/<pid>/maps. Is that true?

It usually fails when malloc() hits your libraries. One solution is to
recompile the kernel with a higher TASK_UNMAPPED_BASE (should be a sysctl,
but is a fixed define currently). That would force the shared libraries 
to start at a higher address and give sbrk() more breathing space.

Another way is to use mallopt(M_MMAP_THRESHOLD, ..)  and set a low mmap
threshold. This allows malloc to use mmap earlier instead of sbrk() and skip
the shared library area.  It comes at a cost thought, malloc() tends to 
become more expensive.

With some more changes you can also force the user space to 3.5GB, at the
cost of much less kernel memory. It usually makes sense to change 
TASK_UNMAPPED_BASE with this.

-Andi

P.S.: I'm pretty sure this is a FAQ.

       reply	other threads:[~2001-12-07 14:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20011207125821.D31161@3dlabs.com.suse.lists.linux.kernel>
     [not found] ` <E16CKrx-0005nL-00@the-village.bc.nu.suse.lists.linux.kernel>
     [not found]   ` <20011207132317.E31161@3dlabs.com.suse.lists.linux.kernel>
2001-12-07 14:02     ` Andi Kleen [this message]
2001-12-07 14:15       ` 2GB process crashing on 2.4.14 Paul Sargent
2001-12-07 12:58 Paul Sargent
2001-12-07 13:16 ` Alan Cox
2001-12-07 13:23   ` Paul Sargent
2001-12-07 13:48     ` Alan Cox
2001-12-07 14:01       ` Paul Sargent

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=p73k7vz6sc9.fsf@amdsim2.suse.de \
    --to=ak@suse.de \
    --cc=Paul.Sargent@3dlabs.com \
    --cc=linux-kernel@vger.kernel.org \
    /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