commit-slab: document clear_$slabname()

The clear_$slabname() function was only documented by source code so far. Write something about it. Signed-off-by: Thomas Rast <tr@thomasrast.ch> Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Nov 25, 2013 at 20:02 UTC dcbbc8fa2e4210b3b564361cf794464ce8968946
1 file changed +10 -1
commit-slab.h
+10 -1
@@ -22,8 +22,17 @@
22 *
23 * Initializes the indegree slab that associates an array of integers
24 * to each commit. 'stride' specifies how big each array is. The slab
25 - * that id initialied by the variant without "_with_stride" associates
25 + * that is initialized by the variant without "_with_stride" associates
26 * each commit with an array of one integer.
27 + *
28 + * - void clear_indegree(struct indegree *);
29 + *
30 + * Empties the slab. The slab can be reused with the same stride
31 + * without calling init_indegree() again or can be reconfigured to a
32 + * different stride by calling init_indegree_with_stride().
33 + *
34 + * Call this function before the slab falls out of scope to avoid
35 + * leaking memory.
36 */
37
38 /* allocate ~512kB at once, allowing for malloc overhead */