>-----Original Message----- >From: Michael R. Hines [mailto:mhines@xxxxxxxxxx] >alloc_pages() only lets me allocate up to 2^9 pages at once, or 2 MB. That's because of the design of buddy system. >Let's take the following situation: I've just booted a machine that >contains 4 GB of memory on a 32-bit machine. >How would I grab ALL of that memory statically, atomically, and >contiguously from within the kernel for use? >Is this possible in linux? Not sure about this one, during boot, the kernel will create the free list for all the free pages right? Once this is done, any kernel component can grap a page(s) by calling the page allocator functions, so I don't think your idea of grabbing all the free pages is going to work. , but even if you succeeded in grabbing all the memory, what will happen to the rest of system which require free pages? -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/