]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - tools/perf/util/xyarray.c
6 struct xyarray
*xyarray__new(int xlen
, int ylen
, size_t entry_size
)
8 size_t row_size
= ylen
* entry_size
;
9 struct xyarray
*xy
= zalloc(sizeof(*xy
) + xlen
* row_size
);
12 xy
->entry_size
= entry_size
;
13 xy
->row_size
= row_size
;
14 xy
->entries
= xlen
* ylen
;
20 void xyarray__reset(struct xyarray
*xy
)
22 size_t n
= xy
->entries
* xy
->entry_size
;
24 memset(xy
->contents
, 0, n
);
27 void xyarray__delete(struct xyarray
*xy
)