lkml.org 
[lkml]   [2005]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 1/5] slab: rename obj_reallen to obj_size
    From
    Date
    Hi Manfred,

    On Sat, 2005-11-19 at 12:57 +0100, Manfred Spraul wrote:
    > With your change, cachep->objsize is the internal allocation and
    > obj_size(cachep) is the user visible part. This reduces the readability.
    > I agree that the names obj_size and reallen are bad. What about the
    > attached patch?

    I like your patch a lot. Some comments below.

    > + /*
    > + * If debugging is enabled, then the allocator can add additional
    > + * fields and/or padding to every object. objsize contains the total
    > + * object size including these internal fields, the following two
    > + * variables contain the offset to the user object and its size.
    > + */
    > + int user_off;

    user_offset is more readable.

    > + int user_size;

    > #endif
    > };
    > -static int obj_dbghead(kmem_cache_t *cachep)
    > +static int obj_user_off(kmem_cache_t *cachep)

    So why not call the above obj_offset() ?

    > -static int obj_reallen(kmem_cache_t *cachep)
    > +static int obj_user_size(kmem_cache_t *cachep)

    and this one obj_size() ?

    Other than that looks good.

    Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>

    Pekka

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-11-19 13:07    [W:0.019 / U:6.044 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site