[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1112131013310.23111@router.home>
Date: Tue, 13 Dec 2011 10:15:27 -0600 (CST)
From: Christoph Lameter <cl@...ux.com>
To: roel <roel.kluin@...il.com>
cc: linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: slab: too much allocated in bootstrap head arrays?
On Mon, 12 Dec 2011, roel wrote:
> In mm/slab.c kmem_cache_init() at /* 4) Replace the bootstrap head arrays */
> it kmallocs *ptr and memcpy's with sizeof(struct arraycache_init). Is this
> correct or should it maybe be with sizeof(struct arraycache) instead?
Allocating with sizeof(struct arraycache) will only allocate the header of
the array cache and not reserve space for the pointers that are part of
it. It is always wrong.
Look at alloc_arraycache() for the proper way to use struct arraycache to
calculate the number of bytes needed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists