From 58aac3dbf64c9a9ef43e882f839fb5fa92ba0485 Mon Sep 17 00:00:00 2001 From: TJ Date: Fri, 1 Apr 2016 05:16:49 +0100 Subject: [PATCH] Add copyright message; move comments Signed-off-by: TJ --- heap_reap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/heap_reap.c b/heap_reap.c index db73423..76f44f8 100644 --- a/heap_reap.c +++ b/heap_reap.c @@ -1,11 +1,9 @@ -/* experimental tracking of heap allocations for easy reaping no matter what the code path is +/* Experimental tracking of heap allocations for easy reaping no matter what the code path is + * Copyright 2016 TJ + * Licensed on the terms of the GNU General Public License version 3. * - * both tasks are in the same function to take advantage of local static variables that are + * Both tasks are in the same function to take advantage of local static variables that are * persistent across calls but invisible to code outside the function. - * - * @param ptr NULL: calloc(nmemb, size), NULL-1: reap all, otherwise free(ptr) - * @param nmemb number of elements of size to allocate - * @param size size if each element */ #include "heap_reap.h" @@ -21,6 +19,11 @@ struct mem_track { size_t allocated; }; +/* + * @param ptr NULL: calloc(nmemb, size), NULL-1: reap all, otherwise free(ptr) + * @param nmemb number of elements of size to allocate + * @param size size if each element + */ void * heap_and_reap(void *ptr, size_t nmemb, size_t size) { -- 2.17.1