8 karma · joined Apr 12, 2024 (2y ago) · 3 submissions
comment 2y ago · link · parent
That seems about right[1], but the MAP_FIXED_NOREPLACE flag has been a thing since Linux 4.17. What about using that?
[1]: https://godbolt.org/z/698dPcvf6