Re: [PATCH 3/4] mm: Add free()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 23, 2018 at 08:14:21AM -0700, Matthew Wilcox wrote:
> On Fri, Mar 23, 2018 at 04:33:24PM +0300, Kirill Tkhai wrote:
> > > +	page = virt_to_head_page(ptr);
> > > +	if (likely(PageSlab(page)))
> > > +		return kmem_cache_free(page->slab_cache, (void *)ptr);
> > 
> > It seems slab_cache is not generic for all types of slabs. SLOB does not care about it:
> 
> Oof.  I was sure I checked that.  You're quite right that it doesn't ...
> this should fix that problem:

This patch was complete rubbish.  The point of SLOB is that it mixes
sizes within the same page, and doesn't store the size when allocating
from a slab.  So there is no way to tell.  I'm going to think about this
some more.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux