Hello,You are wrong because I think that it's benefit of kernel indirect(with magic) lists, it saves memory. I don't know place where it's better to use direct pointer in list element. Do you know?
The linked list implementation is generic, and it is not kernel-oriented as you claimed.
It certainly is, as it requires the list_head to
be the part of the data. Please correct me if i am
wrong.
Why it's benefit? Because if you want list of 'XObj' then often(allways) have more(or equal) list elements then 'XObj' instances altogether.So memory usage for current kernel lists:
sizeof(pointer)*(2*"NumberOfListElements"+"NumberOfXObj")
in case of GList: sizeof(pointer)*(3*"NumberOfListElements")
I think that at least one time you have to put any 'XObj' instance in some list so we got equality of memory usage, but if we want more ocurances of instance then GList loose on memory.
[snip]
Yes, hashes are good. Simplify programming a lot.
Is there a need for hashtables?
Yes of course. I need it and i know that others
may need it as well.
I know only Perl language which support hashes in core, but it's on arrays so perfomance isn't as good as wanted.
Best regards. Ruslan.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/