Module: xenomai-gch
Branch: u_mode
Commit: 2027928d8722c411a210c5b641e6f4964e0fbba7
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=2027928d8722c411a210c5b641e6f4964e0fbba7

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Jun 19 17:20:10 2011 +0200

nucleus: print warning when destroying a heap with allocated data

---

 ksrc/nucleus/heap.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ksrc/nucleus/heap.c b/ksrc/nucleus/heap.c
index 0ab5114..3148ba3 100644
--- a/ksrc/nucleus/heap.c
+++ b/ksrc/nucleus/heap.c
@@ -1395,6 +1395,11 @@ void xnheap_destroy_mapped(xnheap_t *heap,
         */
        XENO_ASSERT(NUCLEUS, mapaddr == NULL || release, /* nop */);
 
+       if (XENO_DEBUG(NUCLEUS) && heap->u_bytes != 0)
+               printk(KERN_ERROR "xnheap: destroying shared heap '%s' "
+                      "with %lu bytes still in use.\n",
+                      heap->label, heap->ubytes);
+
        xnlock_get_irqsave(&nklock, s);
        removeq(&heapq, &heap->stat_link);
        xnvfile_touch_tag(&vfile_tag);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to