Re: How do you allocate huge pages.

From: Matthias Kaehlcke
Date: Tue Jun 19 2007 - 08:36:35 EST


El Tue, Jun 19, 2007 at 05:07:30AM -0700 Shaun Savage ha dit:

> I am trying to allocate very large memory within the kernel. I want to
> start by allocating one huge (4M) page and using that as buffer space.

possibly vmalloc() is what you're looking for, if it isn't really a
*page* of 4M, what afaik is impossible with a standard kernel.

vmalloc() allocates virtually contiguous memory, as opposed to
kmalloc() which allocates physically contiguous memory.

--
Matthias Kaehlcke
Linux Application Developer
Barcelona

La libertad es como la mañana. Hay quienes esperan dormidos a que
llegue, pero hay quienes desvelan y caminan la noche para alcanzarla
(Subcomandante Marcos)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
-
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/