From: Andrew Morton <akpm@osdl.org>
To: Zhonglin Zhang <zhonglinzh@mobilesoft.com.cn>
Cc: linux-kernel@vger.kernel.org
Subject: Re: a little improvement for vmalloc
Date: Wed, 5 Jan 2005 19:38:27 -0800 [thread overview]
Message-ID: <20050105193827.12d83341.akpm@osdl.org> (raw)
In-Reply-To: <1104981532.628.10.camel@milo>
Zhonglin Zhang <zhonglinzh@mobilesoft.com.cn> wrote:
>
> In FUNCTION __vmalloc ,
>
> There is a statement;
>
> if (!size || (size >> PAGE_SHIFT) > num_physpages)
> return NULL;
Probably the second part of the test should be removed. If the requested
area size is
a) less than the size of the vmalloc arena and
b) more than the number of allocatable pages
then yes, the machine will have a ton of trouble allocating the memory and
will actually lock up.
But the only way that will happen is if some code is made to do a large
number of smaller vmallocs. Nobody does a huge single vmalloc like that.
next prev parent reply other threads:[~2005-01-06 3:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-06 3:18 a little improvement for vmalloc Zhonglin Zhang
2005-01-06 3:38 ` Andrew Morton [this message]
2005-01-06 9:26 ` Anton Altaparmakov
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=20050105193827.12d83341.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhonglinzh@mobilesoft.com.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.