Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
powerpc
lib
alloc.c
Go to the documentation of this file.
1
#include <linux/types.h>
2
#include <
linux/init.h
>
3
#include <linux/slab.h>
4
#include <
linux/bootmem.h
>
5
#include <linux/string.h>
6
#include <asm/setup.h>
7
8
9
void
*
__init_refok
zalloc_maybe_bootmem
(
size_t
size
,
gfp_t
mask
)
10
{
11
void
*
p
;
12
13
if
(
mem_init_done
)
14
p = kzalloc(size, mask);
15
else
{
16
p =
alloc_bootmem
(size);
17
if
(p)
18
memset
(p, 0, size);
19
}
20
return
p
;
21
}
Generated on Thu Jan 10 2013 13:14:13 for Linux Kernel by
1.8.2