[lkml]   [2001]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectA Question About kernel source code
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)
addr = tmp->size + (unsigned long) tmp->addr;
if (addr > VMALLOC_END-size) {
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
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:02    [W:0.022 / U:2.632 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site