From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 8 23:51:52 2003 Return-Path: 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 D2B8C16A4BF for ; Mon, 8 Sep 2003 23:51:52 -0700 (PDT) Received: from corpmail.outblaze.com (corpmail.outblaze.com [203.86.166.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FBD743F93 for ; Mon, 8 Sep 2003 23:51:51 -0700 (PDT) (envelope-from yusufg@outblaze.com) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by corpmail.outblaze.com (Postfix) with ESMTP id 9E45537BA4 for ; Tue, 9 Sep 2003 06:51:50 +0000 (GMT) Received: from yusufg.portal2.com (210-177-227-130.outblaze.com [210.177.227.130]) by corpmail.outblaze.com (Postfix) with SMTP id 45DB216DD87 for ; Tue, 9 Sep 2003 06:51:50 +0000 (GMT) Received: (qmail 19439 invoked by uid 500); 9 Sep 2003 07:00:17 -0000 Date: Tue, 9 Sep 2003 15:00:17 +0800 From: Yusuf Goolamabbas To: freebsd-hackers@freebsd.org Message-ID: <20030909070017.GA19395@outblaze.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.11; VAE: 6.21.0.1; VDF: 6.21.0.38; host: corpmail.outblaze.com) Subject: Perl 5.8.1-RC4 release notes mention FreeBSD malloc upto 200 times slower than perl malloc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2003 06:51:52 -0000 In the Perl 5.8.1-RC4 release notes posted here http://dev.perl.org/perl5/news/2003/perl-5.8.1-RC4.html it mentions about the Platform specific problems seen by the Perl development team. ---------------------------------------------------------------------- FreeBSD: malloc dilemma The choice of malloc (the C-level memory management interface) when building Perl is problematic in FreeBSD. Using FreeBSD's system malloc for Perl was found to be very slow: in some cases that was 200 times slower than using the Perl malloc. One such case is file input: for example # slurping the whole compressed Perl source code into $a if (open F,"perl-5.8.1.tar.gz") { local $/; $a= } is about 200-250 times slower with the system malloc than with the Perl malloc. One could use Perl's malloc (Configure -Dusemymalloc), but that was found to cause random core dumps in FreeBSD with multithreaded programs. No such problems were found in other platforms, however. A decision was made to stick with the system malloc, regardless of the performance problems. ---------------------------------------------------------------------- Maybe the test case can assist FreeBSD kernel hackers to make malloc faster. Regards, Yusuf