linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@conectiva.com.br>
To: "Cannizzaro, Emanuele" <ecannizzaro@mtc.ricardo.com>
Cc: ebiederm+eric@ccr.net, leechin@mail.com,
	linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: memory allocation on linux
Date: Wed, 7 Aug 2002 12:53:57 -0300 (BRT)	[thread overview]
Message-ID: <Pine.LNX.4.44L.0208071250110.23404-100000@imladris.surriel.com> (raw)
In-Reply-To: <20020807152229Z16466-21510+1725@humbolt.nl.linux.org>

On Wed, 7 Aug 2002, Cannizzaro, Emanuele wrote:

> I am writing to you regarding your experience to address a huge amount of
> memory on linux using the brk() function.
>
> I am running a program called nastran (v2001) on a pc with redhat 7.2. This
> machine has got 2GB of disk spacebut  when I set the amount of memory to be
> used by nastran to a value bigger than 900 mb I get this fatal error message.
>
> Process Id = 28179
> idalloc: dynamic allocation failed - brk: Cannot allocate memory

The problem is that you have your libc mapped at 1GB offset
and the program executable at 128 MB, leaving about 900 MB
of space for brk().

> I have no access to the source code of the program and therefore I would
> need a patch to the memory allocation.
>
> how can this problem be fixed?

If the program is dynamically linked you could try using a
libc that uses malloc() instead of brk().

If the program uses brk, you could hack the kernel to start
mmap() at a different offset (eg 2 GB).

The easiest and arguably best option would be to link the
program statically so it doesn't have to mmap any libraries,
but it seems like you're stuck with whatever binary was given
to you so you'll have to work around the problem...

regards,

Rik
-- 
Bravely reimplemented by the knights who say "NIH".

http://www.surriel.com/		http://distro.conectiva.com/

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

       reply	other threads:[~2002-08-07 15:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020807152229Z16466-21510+1725@humbolt.nl.linux.org>
2002-08-07 15:53 ` Rik van Riel [this message]
2002-09-20 14:35 Lee Chin
  -- strict thread matches above, loose matches on Subject: below --
2002-09-20  0:21 Lee Chin
2002-09-20  1:03 ` Rik van Riel
2002-08-07 15:19 Cannizzaro, Emanuele

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=Pine.LNX.4.44L.0208071250110.23404-100000@imladris.surriel.com \
    --to=riel@conectiva.com.br \
    --cc=ebiederm+eric@ccr.net \
    --cc=ecannizzaro@mtc.ricardo.com \
    --cc=leechin@mail.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.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