https://linen.dev/ logo
the obvious part is doing less mmap/malloc operati...
# general
a
the obvious part is doing less mmap/malloc operations. But depending on your buffer sizes and alignment, a single large allocation will give you better control of he allocation, i.e. you can make it more likely to be serviced by a THP or just request a hugetlb, like in the code you shared. internally, I think there is some coalescing of contiguous buffers in io_uring too.