diff options
Diffstat (limited to 'src/common/memarea.c')
-rw-r--r-- | src/common/memarea.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/memarea.c b/src/common/memarea.c index 592d03b46c..93b9d4f921 100644 --- a/src/common/memarea.c +++ b/src/common/memarea.c @@ -61,10 +61,12 @@ struct memarea_t { memarea_chunk_t *first; /**< Top of the chunk stack: never NULL. */ }; +/** How many chunks will we put into the freelist before freeing them? */ #define MAX_FREELIST_LEN 4 -/* DOCDOC freelist_len */ -int freelist_len=0; -/* DOCDOC freelist */ +/** The number of memarea chunks currently in our freelist. */ +static int freelist_len=0; +/** A linked list of unused memory area chunks. Used to prevent us from + * spinning in malloc/free loops. */ static memarea_chunk_t *freelist = NULL; /** Helper: allocate a new memarea chunk of around <b>chunk_size</b> bytes. */ |