[zeromq-dev] [PATCH] Fix assertion when swap fills up

Mikko Koppanen mikko.koppanen at gmail.com
Mon Dec 13 23:59:44 CET 2010


On Mon, Dec 13, 2010 at 10:23 PM, Mikko Koppanen
<mikko.koppanen at gmail.com> wrote:
> Hello,
>
> the following patch should fix assertion in pipe.cpp when swap fills
> up. It adds swap::fits() method, which checks if the message actually
> fits into swap rather than just checking if swap is full.
> It seems that there was a bug in swap::full() as it was checking if
> buffer_space == 1. After this the swap behavior should be consistent
> with HWM behavior.

Hi,

noticed that the patch contained a whitespace error on pipe.hpp.
Attaching a fixed version. Also changed swap::full() semantics a bit
as it seems to make more sense to check whether there is buffer space
for at least "sizeof size_t + 1" as those are mandatory on each
message stored.

-- 
Mikko Koppanen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixes-assertion-on-pipe.cpp-237-when-swap-fills-up.patch
Type: application/octet-stream
Size: 3844 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101213/ca3a2956/attachment.obj>


More information about the zeromq-dev mailing list