* A Question About kernel source code
@ 2001-02-06 8:39 Feng Chun
0 siblings, 0 replies; only message in thread
From: Feng Chun @ 2001-02-06 8:39 UTC (permalink / raw)
To: linux-kernel
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-02-06 8:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-06 8:39 A Question About kernel source code Feng Chun
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®