Re: kmalloc without GFP_xxx?

From: Steven Rostedt
Date: Thu Jun 30 2005 - 03:08:17 EST




On Thu, 30 Jun 2005, Denis Vlasenko wrote:

>
> Think about this:
>
> /* may be called under spinlock */
> void do_something() {
> /* we need to alloc here */
> }
>

Well thinking about this :-) The way that this needs to be implemented is
by passing to do_something the flags to use in kmalloc, which is done in
the kernel when needing to call something that allocates when different
flags can be used. So a kmalloc_auto would only save on passing flags in
parameters, which can sometimes get annoying.

-- Steve

-
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/