4 ms·
This has additional restrictions: * (Maximum) item size must be known in advance, and * Buffer items must be smaller than half the buffer size, and * If
by loeg 11y ago
This has additional restrictions:
* (Maximum) item size must be known in advance, and
* Buffer items must be smaller than half the buffer size, and
* If items are not suitably sized, buffer fragmentation may result
There are also some cases where the padded size requirement may exceed available non-wrapped space with bip vs VRB or similar. Anyway, most OS support mmap(2) today :).
- wrl 11y agoYou're right on the second point and the third, though I reckon the fragmentation isn't appreciably worse than in a regular wrap-around circular buffer. Same goes for the first point. I'm keen to see examples where bip buffers exhibit particular issues relative to circular/ring buffers, however, and if you've got any then please send them along. The chief use-case for my bip buffer implementation is using a shared memory segment for inter-process communication, and adding mmap() for address mirroring on top of that just seems like a can of worms I'm not particularly interested in opening.