Re:Re:Re: [PATCH] kmalloc_index optimization(add kmalloc max size check)

From: Christopher Lameter
Date: Tue Apr 21 2020 - 11:57:10 EST


On Tue, 21 Apr 2020, èåå wrote:

> >You could modify that to check for KMALLOC_MAX_SIZE with some more
> >conditionals but then kmalloc_index) is written so that the compiler gets
> >constant folding right.
> For this point, I am afraid i didn`t catch your idea.
> I am not sure how to modify it....
> Is there some similar code implementation in the kernelï

No. That is where you creativity and ingenuity come in. Otherwise you need
to leave it alone.