From 37a38802059420b7a204a27e2f6be6acd360893a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 3 Nov 2024 06:31:13 -0700 Subject: [PATCH] test/recvsend_bundle: use page size for buffer ring https://github.com/axboe/liburing/issues/1207 Signed-off-by: Jens Axboe --- test/recvsend_bundle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/recvsend_bundle.c b/test/recvsend_bundle.c index 6caee75e4..d6c5ec3b4 100644 --- a/test/recvsend_bundle.c +++ b/test/recvsend_bundle.c @@ -291,7 +291,7 @@ static void *recv_fn(void *data) goto err; } - if (posix_memalign(&buf, 4096, MSG_SIZE * RECV_BIDS)) + if (posix_memalign(&buf, sysconf(_SC_PAGESIZE), MSG_SIZE * RECV_BIDS)) goto err; if (!classic_buffers) { @@ -453,7 +453,7 @@ static int do_send(struct recv_data *rd) return 0; } - if (posix_memalign(&buf, 4096, MSG_SIZE * nr_msgs)) + if (posix_memalign(&buf, sysconf(_SC_PAGESIZE), MSG_SIZE * nr_msgs)) return 1; if (!classic_buffers) {