From 8672362a7a38b99dc6a82fbcef197d48f4744a5c Mon Sep 17 00:00:00 2001 From: Vincenz Date: Wed, 10 Dec 2025 21:50:43 +0100 Subject: [PATCH] fix allocation of large circular buffers on unix: add flag to second mmap call of buffer allocation to treat address as a requirement and not as a hint. --- src/double_mapped_buffer/unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/double_mapped_buffer/unix.rs b/src/double_mapped_buffer/unix.rs index 7048457..612722c 100644 --- a/src/double_mapped_buffer/unix.rs +++ b/src/double_mapped_buffer/unix.rs @@ -103,7 +103,7 @@ impl DoubleMappedBufferImpl { buff.add(size), size, libc::PROT_READ | libc::PROT_WRITE, - libc::MAP_SHARED, + libc::MAP_SHARED | libc::MAP_FIXED_NOREPLACE, fd, 0, );