From: Feng Chun <chfeng520@263.net>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: A Question About kernel source code
Date: Tue, 6 Feb 2001 16:39:11 +0800 [thread overview]
Message-ID: <200102060740.PAA05110@njnet.edu.cn> (raw)
Hello everyone:
I have a question about the linux source code.
consider the function:get_vm_area( mm/vmalloc.c )
struct vm_struct * get_vm_area(unsigned long size)
{
struct vm_struct **p,
....
for (p = &vmlist; (tmp = *p) ; p = &tmp->next) {
if (size + addr < (unsigned long) tmp->addr)
break;
addr = tmp->size + (unsigned long) tmp->addr;
if (addr > VMALLOC_END-size) {
kfree(area);
return NULL;
}
}
....
}
notice that here p is defined as a pointer to a pointer, why not
struct vm_struct *p,
for (p=vmlist; (tmp=p); p=tmp->next) {
..
}
does it mean that the later is not efficient as the former?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
reply other threads:[~2001-02-06 8:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200102060740.PAA05110@njnet.edu.cn \
--to=chfeng520@263.net \
--cc=linux-kernel@vger.kernel.org \
/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®