lkml.org 
[lkml]   [2008]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch 1/2] infrastructure to debug (dynamic) objects
    From
    Date

    On Sat, 2008-03-01 at 12:44 +0100, Thomas Gleixner wrote:
    > On Sat, 1 Mar 2008, Andrew Morton wrote:

    > > > +
    > > > +#define ODEBUG_HASH_SIZE 4096
    > >
    > > power-of-2 is said to be a very poor size for a hash table.
    >
    > The hash is not a randomized hash as one would expect. It's purely
    > generated from the object address to simplify the lookup during the
    > free check. So the power of 2 size is a good thing :) /me adds
    > comment.

    Power of two buckets work when used along with a golden ratio based hash
    map - as done by linux/hash.h.

    Power of two hash maps otoh suck royally.



    \
     
     \ /
      Last update: 2008-03-01 23:45    [W:0.020 / U:182.976 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site