Module: xenomai-gch Branch: u_mode Commit: 002c925280ed799095c13eb041e82c4a113bfc04 URL: http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=002c925280ed799095c13eb041e82c4a113bfc04
Author: Gilles Chanteperdrix <[email protected]> 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 a26e4fe..6d3dee5 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 %u bytes still in use.\n", + heap->label, heap->u_bytes); + xnlock_get_irqsave(&nklock, s); removeq(&heapq, &heap->stat_link); xnvfile_touch_tag(&vfile_tag); _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
