Thread (27 messages) 27 messages, 3 authors, 2012-08-03

Re: [RFC 1/4] hashtable: introduce a small and naive hashtable

From: Tejun Heo <tj@kernel.org>
Date: 2012-08-01 18:27:55
Also in: lkml

On Wed, Aug 01, 2012 at 08:24:32PM +0200, Sasha Levin wrote:
On 08/01/2012 08:21 PM, Tejun Heo wrote:
quoted
On Wed, Aug 01, 2012 at 08:19:52PM +0200, Sasha Levin wrote:
quoted
If we switch to using functions, we could no longer hide it anywhere
(we'd need to either turn the buckets into a struct, or have the
user pass it around to all functions).
Create an outer struct hash_table which remembers the size?
Possible. I just wanted to avoid creating new structs where they're not really required.

Do you think it's worth it for eliminating those two macros?
What if someone wants to allocate hashtable dynamically which isn't
too unlikely?  I think it's best to stay away from macro tricks as
much as possible although I gotta admit I fall into the macro trap
more often than I would like.

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help