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
tools
perf
util
xyarray.c
Go to the documentation of this file.
1
#include "
xyarray.h
"
2
#include "
util.h
"
3
4
struct
xyarray
*
xyarray__new
(
int
xlen,
int
ylen,
size_t
entry_size
)
5
{
6
size_t
row_size
= ylen *
entry_size
;
7
struct
xyarray
*xy =
zalloc
(
sizeof
(*xy) + xlen * row_size);
8
9
if
(xy !=
NULL
) {
10
xy->
entry_size
=
entry_size
;
11
xy->
row_size
=
row_size
;
12
}
13
14
return
xy;
15
}
16
17
void
xyarray__delete
(
struct
xyarray
*xy)
18
{
19
free
(xy);
20
}
Generated on Thu Jan 10 2013 15:09:27 for Linux Kernel by
1.8.2