Re: [TECH TOPIC] Implementing malloc

Steven Rostedt <[email protected]> Tue, 30 Jun 2026 14:53:54 -0400
Newsgroups dev.linux.lists.ksummit
Message-ID <[email protected]>
On Mon, 29 Jun 2026 19:19:20 +0100
Matthew Wilcox <[email protected]> wrote:

> #ifdef __KERNEL__
> #define malloc(x)	kvmalloc(x, GFP_KERNEL)
> #endif

If anything, add a might_sleep() to that, so it triggers a very bad warning
if called in any context that does not allow a schedule.

-- Steve