From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 20 00:51:56 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 508EF106566C for ; Wed, 20 Jan 2010 00:51:56 +0000 (UTC) (envelope-from lujiandong1001@yahoo.com.cn) Received: from web15704.mail.cnb.yahoo.com (web15704.mail.cnb.yahoo.com [202.165.102.71]) by mx1.freebsd.org (Postfix) with SMTP id B6A9F8FC0C for ; Wed, 20 Jan 2010 00:51:55 +0000 (UTC) Received: (qmail 61931 invoked by uid 60001); 20 Jan 2010 00:51:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.cn; s=s1024; t=1263948713; bh=IxDTMyazZ3vxKWz38fdKKNv3V45SSyBOOUKBzYGKDuU=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=unTE4rRCO+EuRGGJ5G3gpOBmPrl16d1RJ9Zh0Zq+fN7dWjrFS8dls6fc2LBST97q0BbahEqjaYqw5DWf3jkH4RGLy4wuURy4tcgAt1Tb/ylmZ0EoOI/ozv0/dB6tuP4ZZKurywjPy3LeJPGBnEy5cFyPJART8Vy0JgS6O3Zwg6g= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=QG0q6shb/NiAnHjnjsOaQiUqp8h10i4xXiGT6AsLhKPWSWj1uKtTiNqKDWjWpvqdiutXAQG4hylAxmAMlE/FkmqXUPkwytxBu7p5HsLOXIjCrrUZ42cNSruxE75WAZc8zRTgsinpWOOfx6mXx6/IaUGVb6fT8ZH0zZXIV/zZ9oo=; Message-ID: <780211.61560.qm@web15704.mail.cnb.yahoo.com> X-YMail-OSG: RRcBoeUVM1lBcMXURbFB2mOJxx6.6FHMPVbjrA0g1kRNrcm_0bpSTI30.dQ_o9eZy9unat.s5i.4_D9e9T_UBcpTdKrlc5x6BmlxkI3O_OZS0yOc79mCbc7KR9U3tNzz7Zc5jTZoj1ubAao9GgNZJQhtIcFlA.FwTZnE3lqxvf0t4NPwbnhY2WjlY2.KCr8w64S_3jqCTCpUja925pC9.PN0KT.fYhhSy1D77UyEblTkQUVSK_b2qy2WWFkZTpg- Received: from [218.241.83.19] by web15704.mail.cnb.yahoo.com via HTTP; Wed, 20 Jan 2010 08:51:53 CST X-Mailer: YahooMailRC/240.3 YahooMailWebService/0.8.100.260964 References: <739519.89145.qm@web15707.mail.cnb.yahoo.com> Date: Wed, 20 Jan 2010 08:51:53 +0800 (CST) From: Jiandong Lu To: Xin LI In-Reply-To: MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 20 Jan 2010 03:00:47 +0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: =?utf-8?b?5Zue5aSN77yaIGFib3V0IGxpYnN0ZGMrKyAsY2hhbmdlIHRoZSBk?= =?utf-8?q?efaule_allocator?= 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: Wed, 20 Jan 2010 00:51:56 -0000 Thanks=0A=0A=0A=0A=0A________________________________=0A=E5=8F=91=E4=BB=B6= =E4=BA=BA=EF=BC=9A Xin LI =0A=E6=94=B6=E4=BB=B6=E4=BA=BA= =EF=BC=9A Jiandong Lu =0A=E6=8A=84 =E9=80=81= =EF=BC=9A freebsd-hackers@freebsd.org=0A=E5=8F=91=E9=80=81=E6=97=A5=E6=9C= =9F=EF=BC=9A 2010/1/15 (=E5=91=A8=E4=BA=94) 2:54:42 =E4=B8=8A=E5=8D=88=0A= =E4=B8=BB =E9=A2=98=EF=BC=9A Re: about libstdc++ ,change the defaule allo= cator=0A=0A2010/1/13 Jiandong Lu :=0A> hello,e= veryone.=0A> =E8=81=BD =E8=81=BD I get the current source code from svn,and= successfully build world.=0A> =E8=81=BD =E8=81=BD c++'s standard library i= s from gnu. This library privodes many allocators:=0A> bitmap_allocator_bas= e=0A> malloc_allocator_base=0A> mt_allocator_base=0A> new_allocator_base=0A= > pool_allocator_base=0A> I want to know how to set a default allocator,and= how to change it.=0A>=0A> I have read the Makefile:=0A> /usr/src/gnu/lib/l= ibstdc++/Makefile=0A=0AI have no idea why you will think the allocator is b= eing changed here...=0A=0AThe standard and portable way to override the all= ocator is at the=0Apoint you instance C++ templates by specifing Allocator = parameter.=0AIf, however, you want to globally change the default allocator= without=0Atouching all your source files, the only way is to make modifica= tion=0Aon c++allocator.h, which is, in my opinion, never permitted by the= =0Astandard and banned by god.=0A=0ACheers,=0A-- =0AXin LI http://www.delphij.net=0A=0A=0A=0A _____________________________= ______________________________ =0A =E5=A5=BD=E7=8E=A9=E8=B4=BA=E5=8D=A1=E7= =AD=89=E4=BD=A0=E5=8F=91=EF=BC=8C=E9=82=AE=E7=AE=B1=E8=B4=BA=E5=8D=A1=E5=85= =A8=E6=96=B0=E4=B8=8A=E7=BA=BF=EF=BC=81 =0Ahttp://card.mail.cn.yahoo.com/