projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sg: add read/write FUA options
[fio.git]
/
lib
/
memalign.c
diff --git
a/lib/memalign.c
b/lib/memalign.c
index 137cc8ec3ec4eef920b9524c9b6a374cba32660f..bfbd1e80c851da90410dfbf0565849ce725f3193 100644
(file)
--- a/
lib/memalign.c
+++ b/
lib/memalign.c
@@
-18,7
+18,7
@@
void *fio_memalign(size_t alignment, size_t size)
assert(!(alignment & (alignment - 1)));
assert(!(alignment & (alignment - 1)));
- ptr = malloc(size + alignment + size
+ size
of(*f) - 1);
+ ptr = malloc(size + alignment + sizeof(*f) - 1);
if (ptr) {
ret = PTR_ALIGN(ptr, alignment - 1);
f = ret + size;
if (ptr) {
ret = PTR_ALIGN(ptr, alignment - 1);
f = ret + size;