From owner-freebsd-hackers Tue Oct 22 8:36:35 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D25C737B401 for ; Tue, 22 Oct 2002 08:36:34 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id E849643E9C for ; Tue, 22 Oct 2002 08:36:32 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.5) id g9MFXmvC099960; Tue, 22 Oct 2002 10:33:48 -0500 (CDT) (envelope-from dan) Date: Tue, 22 Oct 2002 10:33:48 -0500 From: Dan Nelson To: Terry Lambert Cc: Danny Braniss , Poul-Henning Kamp , freebsd-hackers@FreeBSD.ORG Subject: Re: malloc Message-ID: <20021022153347.GA92973@dan.emsphone.com> References: <3DB50A5A.F87EDA78@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DB50A5A.F87EDA78@mindspring.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Oct 22), Terry Lambert said: > Danny Braniss wrote: > > > If you want GNU malloc behaviour, then you should install the > > > port for the GNU allocator, and use it instead of the system > > > allocator, and you will end up with the same behaviour that your > > > application has on Linux. > > > > what ticked my curiosity was that the linux binary did work, while > > the fbsd binary did the right thing with respect to the admin > > limits and coredumped when the datasize limit was exeeded. > > The FreeBSD malloc uses anonymous pages mmap'ed off of /dev/zero. > > The Linux malloc uses pages added to the process address space via a > call to sbrk. Actually, on FreeBSD only the page directory is mmap'ed. Data returned to the user is allocated via sbrk. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message