Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Dec 2008 13:28:48 -0800
From:      Yuri <yuri@rawbw.com>
To:        freebsd-questions@freebsd.org
Subject:   Why process memory starts so high up in virtual space with FreeBSD malloc?
Message-ID:  <49345710.9070403@rawbw.com>

next in thread | raw e-mail | index | archive | help
I am compiling the following program:

#include <stdlib.h>
main() { printf("0x%x\n", malloc(1)); }

in 32-bit 7.1-PRERELEASE and get 0x28201100 which is ~673MB of 4GB 
address space or 16%.

When I run the same program with the google malloc (from 
devel/google-perftools)
I get much lower value 0x80aa0e8 which is ~135MB of 4GB address space or 
~3%.

Why FreeBSD memory allocator wastes such a high percentage of the memory 
space?

Yuri




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