lkml.org 
[lkml]   [2017]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] mm, swap: Try kzalloc before vzalloc
On Fri 17-03-17 14:46:22, Huang, Ying wrote:
> +void *swap_kvzalloc(size_t size)
> +{
> + void *p;
> +
> + p = kzalloc(size, GFP_KERNEL | __GFP_NOWARN);
> + if (!p)
> + p = vzalloc(size);
> +
> + return p;
> +}

please do not invent your own kvmalloc implementation when we already
have on in mmotm tree.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-03-17 12:48    [W:1.452 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site