Re: [TECH TOPIC] Implementing malloc
"Vlastimil Babka (SUSE)" <[email protected]> Mon, 29 Jun 2026 20:37:19 +0200
| Newsgroups | dev.linux.lists.ksummit |
|---|---|
| Message-ID | <[email protected]> |
On 6/29/26 8:29 PM, Mark Brown wrote: > On Mon, Jun 29, 2026 at 07:19:20PM +0100, Matthew Wilcox wrote: > >> But we do have code which just needs to allocate "some memory", doesn't >> have any particularly weird restrictions, and where usability is more >> important than "pedal to the metal". An example might be something >> like zlib. It needs to allocate some temporary memory, and why have to > > Or drivers just allocating some driver data. TBH kzalloc() kind of ends > up being that function a lot of the time, I'm not convinced that a high > proportion of the kzalloc(x, GFP_KERNEL) calls out there are the result > of a deep consideration of which allocator to use. Actually "x = kzalloc_obj(*x);" these days, with the GFP_KERNEL implicit.