Re: Use of double pointer in linux kernel Hash list implementation

Namhyung Kim <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <1276745545.1712.8.camel@leonhard>
2010-06-16 (수), 22:50 -0400, Balachandar:
> Hi,
>   I am trying to understand Linux Kernel implementation of linked list
> and hash table. A link to the implementation is here. 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. 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


IMHO **pprev is only needed for fast deletion and/or insertion.


-- 
Regards,
Namhyung Kim
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAkwZl0gACgkQcwWBAay833EoIwCcCOYkqxZP16bCGm8276bIYLbl
Ea4Ania5mC45HNdmN/ZDeR4VOXeDWtjI
=B4/S
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.