Re: [TECH TOPIC] Implementing malloc
Alexey Dobriyan <[email protected]> Mon, 29 Jun 2026 19:48:08 +0300
| Newsgroups | dev.linux.lists.ksummit |
|---|---|
| Message-ID | <1853b736-b043-4ce6-9fbb-98e482311682@p183> |
On Mon, Jun 29, 2026 at 03:29:42PM +0100, Matthew Wilcox wrote: > malloc() is a standard part of the C library. Yet we force new Linux > programmers to learn the difference between vmalloc(), kmalloc() and > kvmalloc(). They even have to acquire an understanding of the difference > between GFP_KERNEL and GFP_ATOMIC. If they are particularly unlucky, > they may have to understand other combinations of GFP flags. > > This topic proposes that we should implement malloc() and calloc(). I'd say no. * they return void*, not T*, * individual kmemcaches should be used more for better debugging experience malexey()