__KMALLOC

Section: LINUX (9)
Updated: August 2005
Index Return to Main Contents
 

NAME

__kmalloc - allocate memory  

SYNOPSIS

void * __kmalloc  (size_t size, unsigned int __nocast flags);

 

ARGUMENTS

size
how many bytes of memory are required.

flags
the type of memory to allocate.

 

DESCRIPTION

kmalloc is the normal method of allocating memory in the kernel.

The flags argument may be one of:


 GFP_USER - Allocate memory on behalf of user. May sleep.


 GFP_KERNEL - Allocate normal kernel ram. May sleep.


 GFP_ATOMIC - Allocation will not sleep. Use inside interrupt handlers.

Additionally, the GFP_DMA flag may be set to indicate the memory must be suitable for DMA. This can mean different things on different platforms. For example, on i386, it means that the memory must come from the first 16MB.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 00:30:14 GMT, August 30, 2005