Module: xenomai-head Branch: master Commit: 898b1e7a479f252f00f1d104083f1d7a18a433fb URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=898b1e7a479f252f00f1d104083f1d7a18a433fb
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 0ab5114..0c1ceeb 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->ubytes != 0) + printk(KERN_ERR "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 [email protected] https://mail.gna.org/listinfo/xenomai-git
