From: David Addison <addy@quadrics.com>
To: Kaloian Manassiev <kmanassieff@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: mmap + mprotect + malloc strange behaviour
Date: Mon, 26 Jul 2004 14:18:21 +0100 [thread overview]
Message-ID: <4105049D.9000008@quadrics.com> (raw)
In-Reply-To: <20040726130106.63000.qmail@web13605.mail.yahoo.com>
Kaloian Manassiev wrote:
>Nevermind, I found it :)
>
>I just found out (by reading
>/usr/src/linux-2.4.20-8/Documentation/sysctl/vm.txt)
>that there is a limit on the number of mappings that a
>process may have and that for some reason malloc
>consumes mappings.
>
>I just increased the limit by editing the file
>/proc/sys/vm/max_map_count. This works okay for my
>application...
>
>Does someone know what repercussions this could have
>on the "normal" operation of the system?
>
>Cheers,
>Kaloian.
>
>
>
>
The glibc malloc heap switches to using mmap()/munmap() for large
allocations (>=128kbytes ?). This behaviour can be turned off by setting;
export MALLOC_TRIM_THRESHOLD_=-1
export MALLOC_MMAP_MAX_=0
See also the mallopt() library call.
Cheers
Addy.
next prev parent reply other threads:[~2004-07-26 13:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-26 13:01 mmap + mprotect + malloc strange behaviour Kaloian Manassiev
2004-07-26 13:18 ` David Addison [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-07-21 21:38 Kaloian Manassiev
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=4105049D.9000008@quadrics.com \
--to=addy@quadrics.com \
--cc=kmanassieff@yahoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.