[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question in vmalloc



On Wed, Jan 16, 2002 at 02:46:27PM +0800, Joe Wong wrote:
>   I am new to the kernel area. I would like to know if there is any
> potentail problem on using vmalloc? If the memory returned by vmalloc
> swappable? If so, how I can turn it to unswappable? I have a kernel
> module to will preallocate some huge data strucutres using vmalloc when
> loaded.

Memory allocated by vmalloc() is not swappable. It is virtually
contiguous because the kernel edits its page tables to make it so.
It is not necessarily physically contiguous, though. The amount of
kernel virtual address space available for vmalloc() allocations is
limited, though, as the address space is laid out statically.

This is how it is done in Linux; other kernels may behave differently
(e.g. AIX).


Cheers,
Bill
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/