• xthexder@l.sw0.com
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    6 days ago

    One cool trick that can be used with circular buffers is to use memory mapping to map the same block of memory to 2 consecutive virtual address blocks. That way you can read the entire contents of the buffer as if it was just a regular linear buffer with an offset.