Skip to content

Commit

Permalink
t/io_uring: fix size confusion in allocate_mem()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
axboe committed Nov 5, 2024
1 parent 433f390 commit f2415d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ static void *allocate_mem(struct submitter *s, int size)
return numa_alloc_onnode(size, s->numa_node);
#endif

if (posix_memalign(&buf, t_io_uring_page_size, bs)) {
if (posix_memalign(&buf, t_io_uring_page_size, size)) {
printf("failed alloc\n");
return NULL;
}
Expand Down

0 comments on commit f2415d7

Please sign in to comment.