Date: Thu, 14 Jan 2010 10:54:42 -0800 From: Xin LI <delphij@gmail.com> To: Jiandong Lu <lujiandong1001@yahoo.com.cn> Cc: freebsd-hackers@freebsd.org Subject: Re: about libstdc++ ,change the defaule allocator Message-ID: <a78074951001141054s4de47827od9d58e286dc98913@mail.gmail.com> In-Reply-To: <739519.89145.qm@web15707.mail.cnb.yahoo.com> References: <739519.89145.qm@web15707.mail.cnb.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2010/1/13 Jiandong Lu <lujiandong1001@yahoo.com.cn>: > hello,everyone. > =C2=A0 =C2=A0 I get the current source code from svn,and successfully bui= ld world. > =C2=A0 =C2=A0 c++'s standard library is from gnu. This library privodes m= any allocators: > bitmap_allocator_base > malloc_allocator_base > mt_allocator_base > new_allocator_base > pool_allocator_base > I want to know how to set a default allocator,and how to change it. > > I have read the Makefile: > /usr/src/gnu/lib/libstdc++/Makefile I have no idea why you will think the allocator is being changed here... The standard and portable way to override the allocator is at the point you instance C++ templates by specifing Allocator parameter. If, however, you want to globally change the default allocator without touching all your source files, the only way is to make modification on c++allocator.h, which is, in my opinion, never permitted by the standard and banned by god. Cheers, --=20 Xin LI <delphij@delphij.net> http://www.delphij.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a78074951001141054s4de47827od9d58e286dc98913>