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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[email protected]"

