<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 15, 2018 at 10:54 PM Jonas Falkevik <<a href="mailto:jonas.falkevik@mobilearts.com">jonas.falkevik@mobilearts.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 15, 2018 at 12:07 PM, Jonas Falkevik <span dir="ltr"><<a href="mailto:jonas.falkevik@mobilearts.com" target="_blank">jonas.falkevik@mobilearts.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_-3606052543593623920gmail-">> <br>
> <br>
> Interesting... I wonder if maybe it wouldn't be better to solve this problem in the code for realloc so that no copy is done when a realloc of the same size if issued... that way we solve it in all places instead of only in the inet_driver<br>
> <br></span><br></blockquote><div>Something like <a href="https://github.com/falkevik/otp/commit/444fb00ff2a9d1f40a8c66f48bea1cf3f07ca86c" target="_blank">https://github.com/falkevik/otp/commit/444fb00ff2a9d1f40a8c66f48bea1cf3f07ca86c</a> ?</div></div></div></div></blockquote><div><br></div><div>I was thinking something more like this: <a href="https://github.com/garazdawi/otp/tree/lukas/erts/realloc_thr_pref_shrink_th">https://github.com/garazdawi/otp/tree/lukas/erts/realloc_thr_pref_shrink_th</a></div><div><br></div><div>This makes it so that the absolute and relative single block shrink thesholds are respected for reallocs made on a remote scheduler. This should solve the problem that you have found also, through as I still haven't reproduced it I can't test that it actually solves it.</div><div><br></div><div>Lukas</div></div></div>