Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Feb 2004 08:21:22 +0000
From:      ml@fruitbat.demon.co.uk
To:        freebsd-amd64@freebsd.org
Subject:   Re: malloc() over 4Gb
Message-ID:  <E1At0Tq-000OYe-0Y@anchor-post-34.mail.demon.net>
In-Reply-To: <20040216235153.GC89536@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
obrien@freebsd.org wrote:
> On Mon, Feb 16, 2004 at 02:00:39PM +0000, ml@fruitbat.demon.co.uk wrote:
> > I went out and bought the box and it does indeed seem to malloc() over
> > 4Gb. However, if you change the allocation from 7*GB to 8*GB in your
> > sample program, it still keels over inside malloc()!
> 
> Define 'keels over'.  Details please.

I could have been clearer, yes....

With the GENERIC kernel, attempting to malloc 8Gb of RAM causes a
SIGSEGV deep within malloc(). The stack trace indicates it crashes in
tcflow() which is called by malloc().

However, I've found MAXDSIZ in the kernel which was set to 8192*1024*1024.
As a result, I've built a new kernel resetting that to 32768*1024*1024 and that
seems to work fine now.

That said, I'm pretty certain malloc() ain't supposed to crash when MAXDSIZ is
hit. I'd expect a NULL to be returned.

All this fun and games on 5.2-RELEASE for AMD64.

> -- David  (obrien@FreeBSD.org)

Regards,

A.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1At0Tq-000OYe-0Y>