#include <linux/vmalloc.h> #include <asm/pgtype_types.h> ... char *p = __vmalloc(byte_size,GFP_KERNEL,PAGE_KERNEL_EXEC); ... if (p != NULL) vfree(p);