Date: Wed, 20 Jan 2010 08:51:53 +0800 (CST) From: Jiandong Lu <lujiandong1001@yahoo.com.cn> To: Xin LI <delphij@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: =?utf-8?b?5Zue5aSN77yaIGFib3V0IGxpYnN0ZGMrKyAsY2hhbmdlIHRoZSBk?= =?utf-8?q?efaule_allocator?= Message-ID: <780211.61560.qm@web15704.mail.cnb.yahoo.com> In-Reply-To: <a78074951001141054s4de47827od9d58e286dc98913@mail.gmail.com> References: <739519.89145.qm@web15707.mail.cnb.yahoo.com> <a78074951001141054s4de47827od9d58e286dc98913@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks=0A=0A=0A=0A=0A________________________________=0A=E5=8F=91=E4=BB=B6= =E4=BA=BA=EF=BC=9A Xin LI <delphij@gmail.com>=0A=E6=94=B6=E4=BB=B6=E4=BA=BA= =EF=BC=9A Jiandong Lu <lujiandong1001@yahoo.com.cn>=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 <lujiandong1001@yahoo.com.cn>:=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 <delphij@delphij= .net> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?780211.61560.qm>