<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Xu,</div></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+void test_mallinfo(void)<br>
+{<br>
+       struct mallinfo info;<br>
+       char *buf;<br>
+       size_t size = 2UL * 1024UL * 1024UL * 1024UL;<br>
+<br>
+       buf = SAFE_MALLOC(size);<br>
+       info = mallinfo();<br>
+       if (info.hblkhd < 0) {<br>
+               print_mallinfo("Test malloc 2G", &info);<br>
+               tst_res(TFAIL, "The member of struct mallinfo overflow, we should use mallinfo2");<br></blockquote><div> </div><div><span class="gmail_default" style="font-size:small">TPASS?</span></div><div><span class="gmail_default" style="font-size:small"></span> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+       } else {<br>
+               /*We will never get here*/<br>
+               tst_res(TPASS, "The member of struct mallinfo doesn't overflow");<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">TFAIL?</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+       }<br>
+       free(buf);<br>
+}<br>
</blockquote></div><br clear="all"><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>