From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 14 17:04:30 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D562D16A400 for ; Thu, 14 Jun 2007 17:04:30 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.freebsd.org (Postfix) with ESMTP id B51FB13C457 for ; Thu, 14 Jun 2007 17:04:30 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from hymn01.u.washington.edu (hymn01.u.washington.edu [140.142.8.55]) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.05) with ESMTP id l5EH4RQa027123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Jun 2007 10:04:27 -0700 Received: from localhost (localhost [127.0.0.1]) by hymn01.u.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l5EH4QD8014467; Thu, 14 Jun 2007 10:04:26 -0700 X-Auth-Received: from [192.55.52.1] by hymn01.u.washington.edu via HTTP; Thu, 14 Jun 2007 10:04:26 PDT Date: Thu, 14 Jun 2007 10:04:26 -0700 (PDT) From: youshi10@u.washington.edu To: Ivan Voras In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-PMX-Version: 5.3.1.294258, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.6.14.94833 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='NO_REAL_NAME 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Cc: hackers@freebsd.org Subject: Re: Reason for doing malloc / bzero over calloc (performance)? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2007 17:04:30 -0000 On Thu, 14 Jun 2007, Ivan Voras wrote: > youshi10@u.washington.edu wrote: > >> Hmmm... I wonder what the Mach kernel in OSX does to allocate memory >> then. I'll have to take a look at OpenDarwin's source sometime and see >> what it does. > > Following the link chain from the benchmark link posted in this thread > I've come to the information that it's similar to -CURRENT: small > allocations are carved from the local pool, big ones from prezeroed > pages (from kernel). > > Do you know if that's with malloc or calloc? What portion of the source demonstrates this? -Garrett