
10 Jun
2009
10 Jun
'09
2:41 a.m.
2009/6/9 Cory Nelson <phrosty@gmail.com>:
I would want to see it taken a step further though. Overhead can be a big deal for large objects, so re-implementing string and vector completely (so that you don't have the pointer/capacity specified twice, in container & allocator) would be a welcome change.
An implementation could already define new/delete and std::allocator in such a way that the allocation block size wasn't stored in the allocation system. Are there any that do so? (And -- if we could ignore backwards compatability -- would it be worth requiring delete[n] so that the same could be done for new[]/delete[]? My gut feeling is that programmers have that information around at delete[]-time anyways...) ~ Scott