You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**12
^
|
A
Region B is not used.
Now, if I want to offer more than 2 bytes for example 4 bytes "3456", the bipbuf_offer will return 0.
But there are enough buffer for 4bytes, it can offer region B and the result will like below:
345612**
^ ^
| |
B A
The text was updated successfully, but these errors were encountered:
Region B is not a second equal sized buffer, that is allocated when the first buffer is full, but just a second consecutive region at the beginning of the ring buffer, that comes into use when the buffer is about to "roll over".
Region B allows the ring buffer to skip the last few bytes at the end of the buffer. This guarantees that all returned memory blocks by the ring buffer are consecutive.
if I have a buff like below:
**12
^
|
A
Region B is not used.
Now, if I want to offer more than 2 bytes for example 4 bytes "3456", the bipbuf_offer will return 0.
But there are enough buffer for 4bytes, it can offer region B and the result will like below:
345612**
^ ^
| |
B A
The text was updated successfully, but these errors were encountered: