[erlang-bugs] fix typo in ethr_aux.c

xyf zfsgeek@REDACTED
Wed Jun 4 03:12:13 CEST 2014


Hi,


It seems there is a typo in file ethr_aux.c,  function ts_event_pool(int size, ethr_ts_event **endpp) tries to
allocate memory at cache line boundary, but the code wrongly detects it, please see attachments,
further, you only needs to allocate extra cache_line_size -1 bytes but not full cache line, because most bytes
you should skip is cache_line_size - 1, patch file ethr_aux.c.diff2 fixed it.


Regards,
Yifeng Xu









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140604/2c34e68b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ethr_aux.c.diff
Type: application/octet-stream
Size: 465 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140604/2c34e68b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ethr_aux.c.diff2
Type: application/octet-stream
Size: 624 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140604/2c34e68b/attachment-0001.obj>


More information about the erlang-bugs mailing list