]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
please lint and doxygen.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 14 Aug 2007 13:18:50 +0000 (13:18 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 14 Aug 2007 13:18:50 +0000 (13:18 +0000)
git-svn-id: file:///svn/unbound/trunk@513 be551aaa-1e26-0410-a405-d3ace91eadb9

testcode/checklocks.c
util/alloc.c

index d65dc26003ec002b7d2f597d4327c19eb006e90c..781e95e41425e386e584f83f73fbcb2de1275572 100644 (file)
@@ -205,7 +205,9 @@ prot_store(struct checked_lock* lock)
        }
 }
 
-size_t lock_get_mem(void* pp)
+/** get memory held by lock */
+size_t 
+lock_get_mem(void* pp)
 {
        size_t s;
        struct checked_lock* lock = *(struct checked_lock**)pp;
index 1350faf9ddaf473c9a646f01746a18e96a00024e..2583d2e43cfa39a161e0d61eb2818d7aab5122e4 100644 (file)
@@ -353,6 +353,7 @@ void *unbound_stat_realloc(void *ptr, size_t size)
        return res+16;
 }
 
+/** log to file where alloc was done */
 void *unbound_stat_malloc_log(size_t size, const char* file, int line,
         const char* func)
 {
@@ -360,6 +361,7 @@ void *unbound_stat_malloc_log(size_t size, const char* file, int line,
        return unbound_stat_malloc(size);
 }
 
+/** log to file where alloc was done */
 void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
         int line, const char* func)
 {
@@ -368,6 +370,7 @@ void *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
        return unbound_stat_calloc(nmemb, size);
 }
 
+/** log to file where free was done */
 void unbound_stat_free_log(void *ptr, const char* file, int line,
         const char* func)
 {
@@ -381,6 +384,7 @@ void unbound_stat_free_log(void *ptr, const char* file, int line,
        unbound_stat_free(ptr);
 }
 
+/** log to file where alloc was done */
 void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
         int line, const char* func)
 {
@@ -389,12 +393,14 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
        return unbound_stat_realloc(ptr, size);
 }
 
+/** special routine for region-allocator, print to log */
 void *unbound_stat_malloc_region(size_t size)
 {
        log_info("region malloc(%u)", (unsigned)size);
        return unbound_stat_malloc(size);
 }
 
+/** special routine for region-allocator, print to log */
 void unbound_stat_free_region(void *ptr)
 {
        if(ptr && memcmp(ptr-8, &mem_special, sizeof(mem_special)) == 0) {