Thanks



________________________________
发件人: Xin LI <[email protected]>
收件人: Jiandong Lu <[email protected]>
抄   送: [email protected]
发送日期: 2010/1/15 (周五) 2:54:42 上午
主   题: Re: about libstdc++ ,change the defaule allocator

2010/1/13 Jiandong Lu <[email protected]>:
> hello,everyone.
> 聽 聽 I get the current source code from svn,and successfully build world.
> 聽 聽 c++'s standard library is from gnu. This library privodes many 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,
-- 
Xin LI <[email protected]> http://www.delphij.net



      ___________________________________________________________ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to