The test can be done at compile time in almost all cases.
static inline void kmalloc(size_t size, int gfp)
{
if (!builtin_constant_p (gfp) || (gfp & GFP_ZERO))
__kzalloc (size, gfp);
else
__kmalloc (size, gfp);
}
I don't advocate that particular approach but it's there if you want it.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/