All of lore.kernel.org
 help / color / mirror / Atom feed
* Use of double pointer in linux kernel Hash list implementation
@ 2010-06-17  2:50 Balachandar
  2010-06-17  3:32 ` Namhyung Kim
  0 siblings, 1 reply; 4+ messages in thread
From: Balachandar @ 2010-06-17  2:50 UTC (permalink / raw)
  To: kernelnewbies, linux-c-programming

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

Hi,
  I am trying to understand Linux Kernel implementation of linked list and
hash table. A link to the implementation is
here<http://lxr.linux.no/linux+v2.6.34/include/linux/list.h>.
I understood the linked list implementation. But i am little confused of why
double pointers is being used in hlist (**pprev). Link for hlist is
here<http://lxr.linux.no/linux+v2.6.34/include/linux/list.h#L554>.
I understand that hlist is used in implementation of hash table since head
of the list requires only one pointer and it saves space. Why cant it be
done using single pointer (just *prev like the linked list)? Please help me.

Thanks,
Bala

[-- Attachment #2: Type: text/html, Size: 720 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-18  2:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17  2:50 Use of double pointer in linux kernel Hash list implementation Balachandar
2010-06-17  3:32 ` Namhyung Kim
2010-06-17 14:34   ` Balachandar
2010-06-18  2:10     ` Namhyung Kim

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.