Re: Memory allocation Failure problem with kmalloc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/07/06, Subbu <[email protected]> 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 <[email protected]>
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux