Re: kfree(NULL)

From: Jan Engelhardt
Date: Sat Apr 22 2006 - 16:27:07 EST


>Kinda. It would be better to put all the counters into a linked list

I'd prefer a binary tree which sorts on the caller address and maps these
addrs to struct someinfo;

>struct likeliness {
> char *file;
> int line;
> atomic_t true_count;
> atomic_t false_count;
> struct likeliness *next;
>};

Oh, and if it is going to stay linked list, why not use struct list_head.

Since we are at it, non-NULL counting could also be done, which could give
an overview who unnecessarily calls kfree too often :>


Jan Engelhardt
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/