Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Free the nodesx->super array and the segmentsx->firstnode array when finished with them. Remove wayx->cid and overwrite wayx->id instead. Overwrite nodex[i]->id=i for later geographically sorted use.