From: Balachandar <bala1486@gmail.com>
To: kernelnewbies@nl.linux.org, linux-c-programming@vger.kernel.org
Subject: Use of double pointer in linux kernel Hash list implementation
Date: Wed, 16 Jun 2010 22:50:17 -0400 [thread overview]
Message-ID: <AANLkTilGln3yZRl1muugML4Qg_1rcTXTf3UeAIzLTOJT@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2010-06-17 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 2:50 Balachandar [this message]
2010-06-17 3:32 ` Use of double pointer in linux kernel Hash list implementation Namhyung Kim
2010-06-17 14:34 ` Balachandar
2010-06-18 2:10 ` Namhyung Kim
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=AANLkTilGln3yZRl1muugML4Qg_1rcTXTf3UeAIzLTOJT@mail.gmail.com \
--to=bala1486@gmail.com \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-c-programming@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;
as well as URLs for NNTP newsgroup(s).