Skip to content

Commit f2415d7

Browse files
committed
t/io_uring: fix size confusion in allocate_mem()
It should always be using the size passed in as to what amount of memory should be allocated, not the individual IO size. This didn't matter previously, as each buffer was allocated independently, but it matters now where a single region will cover all IO buffers. Signed-off-by: Jens Axboe <[email protected]>
1 parent 433f390 commit f2415d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ static void *allocate_mem(struct submitter *s, int size)
10061006
return numa_alloc_onnode(size, s->numa_node);
10071007
#endif
10081008

1009-
if (posix_memalign(&buf, t_io_uring_page_size, bs)) {
1009+
if (posix_memalign(&buf, t_io_uring_page_size, size)) {
10101010
printf("failed alloc\n");
10111011
return NULL;
10121012
}

0 commit comments

Comments
 (0)