![]() | |||||||||||
Messages in this thread |
On 20/07/06, Subbu <subbu@sasken.com> 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@gmail.com> 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 - 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/ | ||||||||||
| Last update: 2006-07-20 10:31 [from the cache] ©2003-2008 | |||||||||||