<div dir="ltr"><div>OK then.<br><br></div>Reviewed-by: Jasper St. Pierre <<a href="mailto:jstpierre@mecheye.net">jstpierre@mecheye.net</a>><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 8, 2014 at 12:53 AM, Alan Coopersmith <span dir="ltr"><<a href="mailto:alan.coopersmith@oracle.com" target="_blank">alan.coopersmith@oracle.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 01/ 7/14 09:38 PM, Jasper St. Pierre wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does FSmalloc do anything special, or is it just a wrapper for historical reasons?<br>
</blockquote>
<br></div>
It's mostly historical. src/FSlibos.h defines it as:<br>
<br>
#ifdef MALLOC_0_RETURNS_NULL<br>
#define FSmalloc(size) malloc(((size) > 0 ? (size) : 1))<br>
#else<br>
#define FSmalloc(size) malloc((size))<br>
#endif<br>
<br>
(plus similar for FScalloc & FSrealloc).<br>
<br>
The +1 for the string-ending \0 byte ensures that the size will always be >0,<br>
thus the difference doesn't matter.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
-Alan Coopersmith- <a href="mailto:alan.coopersmith@oracle.com" target="_blank">alan.coopersmith@oracle.com</a><br>
Oracle Solaris Engineering - <a href="http://blogs.oracle.com/alanc" target="_blank">http://blogs.oracle.com/alanc</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br> Jasper<br>
</div>