cjdelisle/cjdns — pull request #348 by hartzler (2013-09-25 21:41:44+00:00)
Title: Nodestore index

Definitely need the logic double checked, especially in NodeStore_addNode. I ended up not using realloc as I kept having canary problem, but likely due to something dumb I was doing. Instead I use a one time alloc paired with a list of pointers to those objects. Then I just shuffle the pointers sort of like a heap when I want to use / free one. I use the heap-ish of pointers vs the actual items as shuffling the actual items blows up my indexes as it moves out the objects being indexed since the index only points to em...

The branch seems to work for me, as I can use IRC / ping6 etc, but I still have the occasional assert failure complaining about indexing something that has already been indexed. Maybe if you give it a quick scan you will see something stupid I'm doing.

I also made the suggested naming change to capitalize the struct names.

Addresses #334