This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Increasing vector multiplier on 64-bits systems
- From: chris <caj at cs dot york dot ac dot uk>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 28 Oct 2004 13:26:58 +0100
- Subject: Increasing vector multiplier on 64-bits systems
Hi!
I apologise if this turns out to be a stupid comment, but I was thinking
about the recent discussions about how much size we should reserve for
vectors as they grow. It occurs that on a 64-bit system, and once a
vector has got bigger than a single memory page, is there any good
reason not to increase it's size by 4, or even 10 or 100 when we it
grows beyond it's current bounds? There is no risk (at least for a long,
long time) of filling the memory on a 64 bit system even if we
overallocate every variable by a factor of 10,000, or even more.
Except for possible problems of inefficencies because objects are spread
out across memory(and I don't know enough about this.. sorry), there
really shouldn't be much reason to ever reallocate anything, as we could
just give every vector 1GB of space to start with, and expand it to 32GB
if it overflows that.
Any comments welcome :)
Chris