--On 13. Juli 2009 15:36:07 +0200 Gabor Gombas <gomb...@sztaki.hu> wrote:

On Mon, Jul 13, 2009 at 02:09:40PM +0200, Sebastian Hagedorn wrote:

> 4 GB limit of 32 bit binaries?

Perhaps, although I haven't seen it.

That's only 3GB by default, 1GB of address space is reserved for the
kernel. Also, the stack, the executable, and all the shared libraries
the executable uses also occupy some address space.

Good to know.

Of course it's possible that it then tried to allocate one huge
chunk, but I can't see that. Are there better tools to monitor the
memory allocation of a process?

strace -e trace=brk,mmap,munmap (well, this actually traces glibc's
memory management, but it should show the failure).

You. I had to specify mmap2, but then I see this:

mmap2(NULL, 267374592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2218b000
mmap2(NULL, 858675, PROT_READ, MAP_SHARED, 43, 0) = 0x220b9000
munmap(0x220b9000, 858675)              = 0
munmap(0x2218b000, 267374592)           = 0
mmap2(NULL, 682827776, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
brk(0)                                  = 0x993d000
brk(0x32483000)                         = 0x993d000
mmap2(NULL, 682962944, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x337c1000
munmap(0x337c1000, 258048)              = 0
munmap(0x33900000, 790528)              = 0
mmap2(NULL, 682827776, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
fatal error: Virtual memory exhausted

So it really tries to allocate a rather large chunk! I guess that's one more reason to switch to 64-bit when we make he move to RHEL 5.

Thanks!
--
    .:.Sebastian Hagedorn - RZKR-R1 (Gebäude 52), Zimmer 18.:.
                .:.Regionales Rechenzentrum (RRZK).:.
.:.Universität zu Köln / Cologne University - ✆ +49-221-478-5587.:.

Attachment: pgp0WmEua5sro.pgp
Description: PGP signature

----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Reply via email to