On 20/07/06, Subbu <subbu@xxxxxxxxxx> wrote:
Hi, I am working on 2.4.20 kernel. I need to allocate memory with kmalloc. kmalloc fails because i want to allocate more than 128kb. How to handle this issue. Please help me in this regard. How i can allocate memory of size equal to 1Mb with kmalloc or any other function (2.4 kernel)
kmalloc() allocates physically contiguous pages. 1M is a hell of a lot of contig pages to ask for. I doubt you can get that much except at early boot. But, if the pages don't actually need to be physically contiguous, then you can use vmalloc() - it'll give you a virtually contiguous range but the pages are not nessesarily physically contiguous. Why do you need this much btw? -- Jesper Juhl <jesper.juhl@xxxxxxxxx> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html