Re: [PATCH 4/5] mm, swap: Try kzalloc before vzalloc

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

 



Michal Hocko <mhocko@xxxxxxxxxx> writes:

> 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.

Thanks for pointing that out!  I will use it.

Best Regards,
Huang, Ying

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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