We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7776634 commit 0e3fe7bCopy full SHA for 0e3fe7b
src/io.c
@@ -2374,7 +2374,10 @@ _dispatch_operation_perform(dispatch_operation_t op)
2374
}
2375
op->buf = _aligned_malloc(op->buf_siz, siInfo.dwPageSize);
2376
#else
2377
- op->buf = aligned_alloc((size_t)PAGE_SIZE, op->buf_siz);
+ err = posix_memalign(&op->buf, (size_t)PAGE_SIZE, op->buf_siz);
2378
+ if (err != 0) {
2379
+ goto error;
2380
+ }
2381
#endif
2382
_dispatch_op_debug("buffer allocated", op);
2383
} else if (op->direction == DOP_DIR_WRITE) {
0 commit comments