Re: [Lsf-pc] [LSF/MM TOPIC] Matthew's minor MM topics

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

 



On Tue, Jan 23, 2018 at 01:26:46PM +0100, Michal Hocko wrote:
> On Tue 16-01-18 06:13:54, Matthew Wilcox wrote:
> > 3. Maybe we could rename kvfree() to just free()?  Please?  There's
> > nothing special about it.  One fewer thing for somebody to learn when
> > coming fresh to kernel programming.
> 
> I guess one has to learn about kvmalloc already and kvfree is nicely
> symmetric to it.

I'd really like to get to:

#define malloc(sz)	kvmalloc(sz, GFP_KERNEL)
#define free(p)		kvfree(p)
#define realloc(p, sz)	kvrealloc(p, sz, GFP_KERNEL)	/* Doesn't exist yet */
#define calloc(n, sz)	kvmalloc_array(n, sz, GFP_KERNEL)

... or similar.  I wouldn't be surprised if we currently spend more I$
marshalling arguments for kvmalloc than we would spend exporting a new
malloc() function.

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