Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Dec 2008 14:57:23 -0800
From:      Yuri <yuri@rawbw.com>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Why process memory starts so high up in virtual space with FreeBSD malloc?
Message-ID:  <49346BD3.5080506@rawbw.com>
In-Reply-To: <874p1njz3l.fsf@kobe.laptop>
References:  <49345710.9070403@rawbw.com> <874p1njz3l.fsf@kobe.laptop>

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas wrote:
> The FreeBSD malloc(3) implementation can use either mmap() or sbrk() to
> obtain memory from the system.  It does not 'waste a high percentage of
> memory' but it simply maps only high addresses (with an unmapped 'hole'
> in lower addresses).
>   

But the hole it leaves with MALLOC_OPTIONS='dM'  is way larger than the
one left by 'Dm' option. Usually malloc will keep allocating addresses 
higher
than this initial value and will never come back and fill some parts of 
this gap.
Therefore "wasting" this space.

Yuri





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49346BD3.5080506>