Re: Red Black Trees

2006-05-02 Thread Damien Miller
the value returned by RB_FIND() directly. I ask because the man page is clear for splay trees, but I am not certain for Red Black trees. I looked at /usr/include/sys/tree.h, and I did not find any explicit free's. That is because it is a data structure and not an allocator. The caller must do

Re: Red Black Trees

2006-05-02 Thread Henning Brauer
* Brian [EMAIL PROTECTED] [2006-05-02 07:06]: I am reading through the tree(3), and I need some clarification. If I want to correctly remove an element from a red black tree that I have found and free it's memory allocation, this code should work, right? find.i = 400; n =

Red Black Trees

2006-05-01 Thread Brian
(inttree, head, n); free(n); } else if (n == NULL) (void)printf(satisfied NULL check\n); I ask because the man page is clear for splay trees, but I am not certain for Red Black trees. I looked at /usr/include/sys/tree.h, and I did not find any explicit free's. I assume that since RB_REMOVE