radix/patrica tree
Posted: Wed Sep 23, 2009 12:04 am
Ok, finally I got my radix/patrica tree implemented But I think that the algo can be optimized. Maybe someone has an idea how I can make it even faster?!
I also need an idea how I can move the strings, which are used in the tree, to another location (out of the elf file into kernel space) without having the strings more than one time in kernel space. The problem here is, that I don´t know if I have a string in kernel space or not. So I started to only move those strings, where the node has a value != 0 and then I parse the tree again and get the addr of the strings where the value is == 0. But this doesn´t work
Edit::
I solved the problem with moving the strings. I just have to traverse the tree in postorder.
I also need an idea how I can move the strings, which are used in the tree, to another location (out of the elf file into kernel space) without having the strings more than one time in kernel space. The problem here is, that I don´t know if I have a string in kernel space or not. So I started to only move those strings, where the node has a value != 0 and then I parse the tree again and get the addr of the strings where the value is == 0. But this doesn´t work
Edit::
I solved the problem with moving the strings. I just have to traverse the tree in postorder.