Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Re: std::vector memory allocation (http://www.velocityreviews.com/forums/t267719-re-std-vector-memory-allocation.html)

John Harrison 06-25-2003 05:42 PM

Re: std::vector memory allocation
 

"onion_skin" <onion_skin_RMV@travers.com> wrote in message
news:iu6jfvgfbuqaq94labritd9od6bt86hbdi@4ax.com...
> When a std::vector has to allocate more memory, am I correct in
> thinking that it allocates additional memory of equal size to the
> amount of memory required to store the existing number of elements?


No that's not correct, and wouldn't be efficient enough.

Actual method is implementation defined, doubling the capacity each time
would be a possible method however.

john




All times are GMT. The time now is 09:58 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.