lkml.org 
[lkml]   [2014]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Memory allocator semantics
From
Hi Paul,

On Sun, Feb 9, 2014 at 4:00 AM, Paul E. McKenney
<paulmck@linux.vnet.ibm.com> wrote:
> From what I can see, (A) works by accident, but is kind of useless because
> you allocate and free the memory without touching it. (B) and (C) are the
> lightest touches I could imagine, and as you say, both are bad. So I
> believe that it is reasonable to prohibit (A).
>
> Or is there some use for (A) that I am missing?

So again, there's nothing in (A) that the memory allocator is
concerned about. kmalloc() makes no guarantees whatsoever about the
visibility of "r1" across CPUs. If you're saying that there's an
implicit barrier between kmalloc() and kfree(), that's an unintended
side-effect, not a design decision AFAICT.

Pekka


\
 
 \ /
  Last update: 2014-02-11 10:21    [W:0.181 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site