I am not sure how your vnum's are distributed, but if, just IF look like this:
100-159 200-287 300-365 400-412 (wow small area) ... 1532400-1532462 Than MAYBE you could make an array of length 15324 having the value of address of dynamic arrays. Then you have 15324 dynamic arrays with length 60, 88, 66, 13, ..., 63 respectively. That will save memory, and you could call vnum x by pRoomArray[x/100-1][x%100] or something of the like. I am not sure of the possibility of this, though, since I just started programming a few month ago. Htam Jason Gauthier wrote: > > Hey Gang- > > Sometime back I removed all my get_room_index (and others) with an array. > (pRoomArray). > > However, I have *very* high vnums. So, I've defined a MAX_ROOM at 1500000. > His makes for a large array! > > I use pRoomArray[vnum] to quickly and efficiently access room data. > > I would like to use this convention while allocating the memory in the array > dynamically (so I only allocate 300k rooms worth, not 1.5m) > > Is there someway I can keep my method but gain a better allocation concept? > > I don't want to loop through pointers, or vnums, or anything to find a room. > I want to call it out quickly and easily. > > All ideas welcome, and I hope I've explained what I'm doing here. > > Thanks! > > Jason > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom

