lkml.org 
[lkml]   [2018]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] mm: Add free()
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.

\
 
 \ /
  Last update: 2018-03-26 01:56    [W:0.117 / U:6.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site