Peter Dimov wrote: [snip] >> I see your point but what is the alternative? Forcing people to >> replace global new/delete? > > In a word, yes. Although replacing global new/delete is forced by the > system allocator being not up to the task and not by us. > > I understand that for some applications region-based memory > management can > be a big performance win. I also understand that some (uncommon in my > experience) cases can't be supported by a global allocator (when two > independent regions are active at once, in a single thread.) But I'm > not > sure that Allocators (as spelled in the standard) are the answer, and > I'm entertaining the thought that in the long term this kind of > customization harms the C++ community. Maybe not one's particular > corner of the community, but the community as a whole.
I agree but we're stuck with a hen/egg problem, as you have already pointed out. Today, quite a few system allocators are not up to the task, so people absolutely need customization. For cross-platform stuff this is true until the very last platform has come around, which might be never :(. Moreover, for some platforms compiler implementers can always argue that they cannot satisfy most of the crowd anyway, so customization and the sub-standard allocators will remain. E.g. I hope to convince some of the embedded systems/real-time crowd to use the fsm lib I'm currently implementing. I would bet that even in 10 years most of them wouldn't even consider using it unless they were able to totally control how memory is allocated... Regards, Andreas _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost