From 6255c4c6a5599724d18311a7776aebe67f8e6d4a Mon Sep 17 00:00:00 2001
From: nsz <nsz@port70.net>
Date: Sun, 13 May 2012 01:50:53 +0200
Subject: search: add comments to tsearch_avl.c

---
 src/search/tsearch_avl.c | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src')

diff --git a/src/search/tsearch_avl.c b/src/search/tsearch_avl.c
index f5c2cf61..b56159b9 100644
--- a/src/search/tsearch_avl.c
+++ b/src/search/tsearch_avl.c
@@ -1,6 +1,12 @@
 #include <stdlib.h>
 #include <search.h>
 
+/*
+avl tree implementation using recursive functions
+the height of an n node tree is less than 1.44*log2(n+2)-1
+(so the max recursion depth in case of a tree with 2^32 nodes is 45)
+*/
+
 struct node {
 	const void *key;
 	struct node *left;
-- 
cgit v1.2.3-70-g09d2