reallocation

Joined
Feb 12, 2008
Messages
108
Reaction score
0
Hello everyone,


We alway meet with the term reallocation, but after some deep thinking, I am confused what exact definition of what means reallocation. Here is some statements from the book The C++ Standard Library as quoted below.

My two questions,

1. How do you understand the term reallocation in the book quoted section?

2. Are there any standard definition for reallocation?

My understanding, reallocation means making storage larger or smaller (or making the same size, but different address? not sure?), whether or not it involves free existing memory (e.g. vector) or not (e.g. deque) depends on internal implementation. It is hard to find a suitable definition for reallocation, if you have, please share with me. :)

section 6.3.1 Abilities of deques

--------------------
Deques provide no support to control the capacity and the moment of reallocation. In particular, any insertion or deletion of elements other than at the beginning or end invalidates all pointers, references, and iterators that refer to elements of the deque. However, reallocation may perform better than for vectors, because according to their typical internal structure, deques don't have to copy all elements on reallocation.
--------------------


thanks in advance,
George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top