M
mojumbo
I'm asking for a lot here but what I would like to do is create a
dynamically growing memory pool whose addresses don't change. I
understand I can't do this with std::vector so for the explanation
I'll use an imaginary class called pool.
What I mean:
pool.push_back(object); // Increases memory size by a block size,
say 10 elements
After 10 push_back's
pool.push_back(object); // APPEND 10 additional memory block sizes BUT
elements 1 thru 10 retain their memory locations.
What I'm trying to do:
I am trying to use a tree whose elements maintain a key and a pointer
to the data. That data will reside in a memory pool which grows
dynamically. Don't worry about shrinking.
Any ideas would be gr8.
dynamically growing memory pool whose addresses don't change. I
understand I can't do this with std::vector so for the explanation
I'll use an imaginary class called pool.
What I mean:
pool.push_back(object); // Increases memory size by a block size,
say 10 elements
After 10 push_back's
pool.push_back(object); // APPEND 10 additional memory block sizes BUT
elements 1 thru 10 retain their memory locations.
What I'm trying to do:
I am trying to use a tree whose elements maintain a key and a pointer
to the data. That data will reside in a memory pool which grows
dynamically. Don't worry about shrinking.
Any ideas would be gr8.