Menu

📰
24

Magic Buffers and io_uring Registered Buffers – Some Assembly Required

#mindfruit#memory#buffer#region#virtual#magic
Reading 0:00
15s threshold

There’s a really cool little mmap gadget that maps the same underlying memory region into two contiguous virtual memory address ranges. When you write past the end of the first mapped region, the remaining bytes end up in the second mapped region ( and at the start of the first one). Fabien Giesen calls this a “ Magic Ring Buffer ”, which is good enough for me. I wondered whether the virtual memory contortions would survive contact with IO Uring’s registered buffers. It turns out (spoiler alert) that they do, and it’s virtual memory all the way down. I wrote a little test application, and have published it on my Github with some more comments here .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More