mirror of
https://github.com/git/git.git
synced 2024-05-14 02:16:09 +02:00
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>
This commit is contained in:
parent
c302941cd7
commit
dcbbc8fa2e
|
@ -22,8 +22,17 @@
|
||||||
*
|
*
|
||||||
* Initializes the indegree slab that associates an array of integers
|
* Initializes the indegree slab that associates an array of integers
|
||||||
* to each commit. 'stride' specifies how big each array is. The slab
|
* to each commit. 'stride' specifies how big each array is. The slab
|
||||||
* that id initialied by the variant without "_with_stride" associates
|
* that is initialized 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 */
|
||||||
|
|
Loading…
Reference in New Issue