On Thursday 22 December 2005 23:00, Maziar H wrote: > Hi all, > > I noticed in some of the kernel stuctures specially in hash tables when a > collision happens they have both a red-black tree and a regular link list > structure for storing the same object, that is they store the same object > both in a red-black tree structure and in a regular linear link list. Could > anyone explain why they want to maintain the same object in two separate > lists? > > Thanks > st > > > --------------------------------- > Yahoo! DSL Something to write home about. Just $16.99/mo. or less I think they have the both the list and the tree, because they are used for different situations. For example if you want to find a object it is more efficient to use the tree to search. but if you want to visit all the objects it is better to use the list than the tree -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/