mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: Subbu <subbu@sasken.com>
Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org,
	subbu2k_av@yahoo.com
Subject: Re: Memory allocation Failure problem with kmalloc.
Date: Thu, 20 Jul 2006 10:27:13 +0200	[thread overview]
Message-ID: <9a8748490607200127r40ad4e66iffa3a6efb6f9f06c@mail.gmail.com> (raw)
In-Reply-To: <Pine.GSO.4.64.0607201340580.13879@sunm21.sasken.com>

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

  reply	other threads:[~2006-07-20  8:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-07 10:58 kernel thread priority Subbu
2006-07-07 12:34 ` linux-os (Dick Johnson)
2006-07-17 10:40 ` Compiling Driver code for 2.6 kernel Subbu
2006-07-17 10:47   ` Arjan van de Ven
2006-07-20  8:16   ` Memory allocation Failure problem with kmalloc Subbu
2006-07-20  8:27     ` Jesper Juhl [this message]
2006-07-20 10:54     ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a8748490607200127r40ad4e66iffa3a6efb6f9f06c@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=subbu2k_av@yahoo.com \
    --cc=subbu@sasken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®