Increasing vector multiplier on 64-bits systems
chris
caj@cs.york.ac.uk
Thu Oct 28 12:33:00 GMT 2004
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
More information about the Libstdc++
mailing list