From owner-freebsd-questions@FreeBSD.ORG Mon Dec 1 23:43:16 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6098C1065670 for ; Mon, 1 Dec 2008 23:43:16 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 259068FC0A for ; Mon, 1 Dec 2008 23:43:15 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id mB1NhFgp021884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Dec 2008 17:43:15 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id mB1NhD5l021868; Mon, 1 Dec 2008 17:43:13 -0600 (CST) (envelope-from dan) Date: Mon, 1 Dec 2008 17:43:12 -0600 From: Dan Nelson To: Yuri Message-ID: <20081201234311.GE53570@dan.emsphone.com> References: <49345710.9070403@rawbw.com> <874p1njz3l.fsf@kobe.laptop> <49346BD3.5080506@rawbw.com> <20081201233758.GD53570@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081201233758.GD53570@dan.emsphone.com> X-OS: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Giorgos Keramidas , freebsd-questions@freebsd.org Subject: Re: Why process memory starts so high up in virtual space with FreeBSD malloc? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 23:43:16 -0000 In the last episode (Dec 01), Dan Nelson said: > Here's what I get with a simple test program on a month-old 7.1-PRE Gah. silly mailing-list attachment stripper. #include #include int main(void) { size_t malloced = 0; size_t chunksize = 1024*1024; void *first = NULL; void *last = NULL; void *ptr; while ((ptr = malloc(chunksize)) != NULL) { if (first == NULL) first = ptr; last = ptr; malloced += chunksize; } printf("Malloced %zu bytes. First: %p, Last: %p\n", malloced, first, last); exit(0); } -- Dan Nelson dnelson@allantgroup.com