Add copyright message; move comments
authorTJ <hacker@iam.tj>
Fri, 1 Apr 2016 04:16:49 +0000 (05:16 +0100)
committerTJ <hacker@iam.tj>
Fri, 1 Apr 2016 04:16:49 +0000 (05:16 +0100)
Signed-off-by: TJ <hacker@iam.tj>
heap_reap.c

index db73423..76f44f8 100644 (file)
@@ -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 <hacker@iam.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)
 {