[lkml]   [2004]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC] [PATCH] kmem_alloc (generic wrapper for kmalloc and vmalloc)
    On Wed, 2004-11-10 at 07:31 +0100, Carl-Daniel Hailfinger wrote:

    > Yes, but what do you suggest for the following problem:
    > alloc(max_loop*sizeof(struct loop_device))
    > where sizeof(struct loop_device)==304 and 1<=max_loop<=16384
    > For the smallest allocation (304 bytes) vmalloc is clearly wasteful
    > and for the largest allocation (~ 5 MBytes) kmalloc doesn't work.

    Stab in the dark: Break it into two separate loops?

    Two loops would be faster than the branch on each alloc, too.

    Even better: Re-architect so as not to need that mess at all?

    Robert Love

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:07    [W:0.023 / U:31.904 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site