__KMALLOC

Section: (9)
Updated: 13 April 2004
Index Return to Main Contents

 

NAME

__kmalloc - allocate memory  

SYNOPSIS

void * __kmalloc (size_t size, int 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.  

ABOUT THIS DOCUMENT

This documentation was generated with kernel version 2.6.1.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
ABOUT THIS DOCUMENT

This document was created by man2html, using the manual pages.
Time: 11:21:53 GMT, April 13, 2004