+ * Example:
+ * static int last_id = -1;
+ * struct foo {
+ * unsigned int id;
+ * ...
+ * };
+ *
+ * // Create a new foo, assigning a consecutive id.
+ * // This maximizes the time before ids roll.
+ * struct foo *new_foo(void)
+ * {
+ * int id;
+ * foo = malloc(sizeof(*foo));
+ * if (!foo)
+ * return NULL;
+ *
+ * id = idtree_add_above(ids, foo, last_id+1, INT_MAX);
+ * if (id < 0) {
+ * id = idtree_add(ids, foo, INT_MAX);
+ * if (id < 0) {
+ * free(foo);
+ * return NULL;
+ * }
+ * }
+ * last_id = id;
+ * foo->id = id;
+ * return foo;
+ * }