From: TJ Date: Fri, 1 Apr 2016 04:16:49 +0000 (+0100) Subject: Add copyright message; move comments X-Git-Tag: v1.3~2 X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=firmware_header_edit.git;a=commitdiff_plain;h=58aac3dbf64c9a9ef43e882f839fb5fa92ba0485 Add copyright message; move comments Signed-off-by: TJ --- 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) {