lkml.org 
[lkml]   [2010]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] fs: use kmalloc() to allocate fdmem if possible
On Mon, May 3, 2010 at 2:06 PM, Avi Kivity <avi@redhat.com> wrote:
>
> My point is, vmalloc() and vfree should do this, not their callers:
>
> vmalloc(size):
>    if (size <= PAGE_SIZE)
>        return kmalloc(size, GFP_KERNEL);
>    ...
>
> vfree(p):
>    if (!is_vmalloc_addr(p) {
>        kfree(p);
>        return;
>    }
>    ...

I think we should not change vmalloc/vfree, and you can invent new
memory APIs, such as malloc()/free().

--
Regards,
Changli Gao(xiaosuo@gmail.com)
--
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/

\
 
 \ /
  Last update: 2010-05-03 09:09    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog