Whenever things get tough, C++ wimps out and forces another pointer
indirection.
Of course, this 'solves' the problem for the C++ implementor, but throws a
much larger problem over the fence onto the poor application writer and/or
memory manager, who is now forced to deal with a much higher load of smaller
objects.
Whoever said that C++ doesn't force you to pay for features you don't use
hasn't ever programmed in C++ to any extent.
-- Henry Baker
[(Re: allocator and GC locality (was Re: cost of malloc),
)]
C++ /C'-pluhs-pluhs/ n.
Designed by Bjarne Stroustrup
of AT& T Bell Labs as a successor to C. Now one of the
languages of choice, although many hackers still grumble that
it is the successor to either Algol 68 or Ada (depending on
generation), and a prime example of second-system effect....
aliasing bug: n. A class of subtle programming errors that can
arise in code that does dynamic allocation, esp. via
`malloc(3)' or equivalent. If several pointers address
(`aliases for') a given hunk of storage, it may happen that the
storage is freed or reallocated (and thus moved) through one alias
and then referenced through another, which may lead to subtle (and
possibly intermittent) lossage depending on the state and the
allocation history of the malloc {arena}....
aliasing bug n.
A class of subtle programming errors that
can arise in code that does dynamic allocation, esp. via
malloc(3) or equivalent. If several pointers address
(`aliases for') a given hunk of storage, it may happen that the
storage is freed or reallocated (and thus moved) through one alias
and then referenced through another, which may lead to subtle (and
possibly intermittent) lossage depending on the state and the
allocation history of the malloc arena....