arranging items in memory as multimap(balanced tree)

  • Thread starter kasthurirangan.balaji
  • Start date
K

kasthurirangan.balaji

Hello,

I have some items in memory(character array) separarted with the
newline character and the items are sorted inside the array. I already
have a version of the code using a multimap object. Basically what i
do is - i traverse the items and insert into the multimap object
accordingly. As long as there are few items, i see no problems, but as
items grow, memory occupancy will be 2x times the items. I intend to
use dynamic version of the array so that i can release the memory once
the multimap object is done. Meanwhile, i want to know if the
memory(character array) could be attached to a multimap object so that
the same memory now holds items as
balanced rb tree.

Thanks,
Balaji.
 
K

kasthurirangan.balaji

* (e-mail address removed):



Pointers.

Better, a reference string type.

Old code for reference string type (example, usable as-is but unfinished) <url:http://sourceforge.net/projects/alfsstringvalue/>.

Cheers & hth.,

- Alf

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Hello Alf,

Thanks for your reply(lone reply). I am considering using pointers,
but not right now. The solution i am going to adopt is freeing the
dynamic array once the multimap is done.

To be frank, i haven't gone thru your string value. Just browsed the
sourceforge page.

Thanks,
Balaji.
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top