Re: Alloc and lock down large amounts of memory

Alan Cox (alan@lxorguk.ukuu.org.uk)
18 Aug 2002 13:18:17 +0100


On Sun, 2002-08-18 at 13:09, Gilad Ben-Yossef wrote:
> > Can 256M be allocated using vmalloc, if so is it swappable?
>
> It can be alloacted via vmalloc and AFAIK it is not swappable by
> default. This doesn't sound like a very good idea though.

There isnt enough address space for vmalloc to grab 256Mb. If you want
that much then you need to handle the fact its in page arrays not
virtually linear yourself.

> Yes. See /proc/kcore for a very obvious example. Also "Linux device
> drivers second edition" has many good exmaple on the subject in the
> chapter devoted to mmap.

A better worked example for large volumes of memory might be
drivers/media/video/bttv*.c.

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