On Mon, May 3, 2010 at 3:42 PM, Avi Kivity<avi@xxxxxxxxxx> wrote:
On 05/03/2010 10:05 AM, Changli Gao wrote:Because vmalloc is used to allocate virtually contiguous memory. v in
On Mon, May 3, 2010 at 2:06 PM, Avi Kivity<avi@xxxxxxxxxx> wrote:Why?
My point is, vmalloc() and vfree should do this, not their callers:I think we should not change vmalloc/vfree, and you can invent new
vmalloc(size):
if (size<= PAGE_SIZE)
return kmalloc(size, GFP_KERNEL);
...
vfree(p):
if (!is_vmalloc_addr(p) {
kfree(p);
return;
}
...
memory APIs, such as malloc()/free().
vmalloc means virtually.