Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 19 Sep 2005 14:09:04 +0800 | From | Coywolf Qi Hunt <> | Subject | Re: p = kmalloc(sizeof(*p), ) |
| |
On 9/19/05, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote: > > It would be very useful when e.g. tracking down improper uses of > > struct file, struct dentry, etc. - stuff that should always be > > allocated by one helper function. Same goes for e.g. net_device - > > Another useful trick here btw is to make such objects contain (when > debugging) > > void *magic_ptr; > > which is initialised as foo->magic_ptr = foo; > > That catches anyone copying them and tells you what got copied
seems like C++ RTTI -- Coywolf Qi Hunt http://sosdg.org/~coywolf/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |