<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Xu,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Yang Xu <<a href="mailto:xuyang2018.jy@cn.fujitsu.com">xuyang2018.jy@cn.fujitsu.com</a>> wrote:<br></div><div dir="ltr" class="gmail_attr"><br></div><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_default" style="font-size:small">...</span><br>
<br>
So I use this code "MAX(info.fordblks, 131072)" to get the right value <br>
to trigger mmap.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">My 2 cents:</div></div><div><br></div><div><div class="gmail_default" style="font-size:small">From what I understand, once we request memory larger than the upper</div><div class="gmail_default" style="font-size:small">limit DEFAULT_MMAP_THRESHOLD_MAX, Glibc will always make use</div><div class="gmail_default" style="font-size:small">of mmap() because it will be out of any value it can adjust in dynamical.</div><div class="gmail_default" style="font-size:small">So that we don't be bothered with this issue anymore.</div><br></div><div><div class="gmail_default" style="font-size:small">Or:</div><div class="gmail_default" style="font-size:small"><br></div></div><div><div class="gmail_default" style="font-size:small">Invoking mallopt(M_MMAP_THRESHOLD, ...) function in front of the</div><div class="gmail_default" style="font-size:small">SAFE_MALLOC helps to fix the threshold. In such a case, the dynamic</div><div class="gmail_default" style="font-size:small">adjustment of the mmap threshold will be disabled. </div></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>