mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 07:52:34 +00:00
UML had two wrapper procedures for kmalloc, um_kmalloc and um_kmalloc_atomic because the flag constants weren't available in userspace code. kern_constants.h had made kernel constants available for a long time, so there is no need for these wrappers any more. Rather, userspace code calls kmalloc directly with the userspace versions of the gfp flags. kmalloc isn't a real procedure, so I had to essentially copy the inline wrapper around __kmalloc. vmalloc also had its own wrapper for no good reason. This is now gone. Signed-off-by: Jeff Dike <[email protected]> Cc: Paolo 'Blaisorblade' Giarrusso <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
23 lines
459 B
C
23 lines
459 B
C
/*
|
|
* Copyright (C) 2005 Paolo 'Blaisorblade' Giarrusso <[email protected]>
|
|
* Licensed under the GPL
|
|
*/
|
|
|
|
#ifndef __UM_MALLOC_H__
|
|
#define __UM_MALLOC_H__
|
|
|
|
#include "kern_constants.h"
|
|
|
|
extern void *__kmalloc(int size, int flags);
|
|
static inline void *kmalloc(int size, int flags)
|
|
{
|
|
return __kmalloc(size, flags);
|
|
}
|
|
|
|
extern void kfree(const void *ptr);
|
|
|
|
extern void *vmalloc(unsigned long size);
|
|
extern void vfree(void *ptr);
|
|
|
|
#endif /* __UM_MALLOC_H__ */
|