Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
commit-slab: document clear_$slabname()
author
Thomas Rast
<tr@thomasrast.ch>
Mon, 25 Nov 2013 19:02:00 +0000
(20:02 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 27 Nov 2013 18:44:13 +0000
(10:44 -0800)
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>
commit-slab.h
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c302941
)
diff --git
a/commit-slab.h
b/commit-slab.h
index d4c8286470c1adef499ca30e9f57c7fe4b2be2da..acfef966c38c86c805f913faaed3aaf955672c9d 100644
(file)
--- a/
commit-slab.h
+++ b/
commit-slab.h
@@
-22,8
+22,17
@@
*
* Initializes the indegree slab that associates an array of integers
* to each commit. 'stride' specifies how big each array is. The slab
*
* Initializes the indegree slab that associates an array of integers
* to each commit. 'stride' specifies how big each array is. The slab
- * that i
d initiali
ed by the variant without "_with_stride" associates
+ * that i
s initializ
ed by the variant without "_with_stride" associates
* each commit with an array of one integer.
* each commit with an array of one integer.
+ *
+ * - void clear_indegree(struct indegree *);
+ *
+ * Empties the slab. The slab can be reused with the same stride
+ * without calling init_indegree() again or can be reconfigured to a
+ * different stride by calling init_indegree_with_stride().
+ *
+ * Call this function before the slab falls out of scope to avoid
+ * leaking memory.
*/
/* allocate ~512kB at once, allowing for malloc overhead */
*/
/* allocate ~512kB at once, allowing for malloc overhead */