Messages in this thread | | | Date | Mon, 24 Jan 2000 22:37:10 +0100 | From | Jamie Lokier <> | Subject | Re: [patch-2.3.40-pre6] kzalloc() (ala kmem_zalloc() of SVR4) |
| |
Jeff Garzik wrote: > >From the last discussion, I believe Jes if not others pointed out that > adding GFP_ZERO meant adding something new to a speed-critical path, > which might not be a good idea.
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/
| |