On 01/ 7/14 09:38 PM, Jasper St. Pierre wrote:
Does FSmalloc do anything special, or is it just a wrapper for historical 
reasons?

It's mostly historical.  src/FSlibos.h defines it as:

#ifdef MALLOC_0_RETURNS_NULL
#define FSmalloc(size) malloc(((size) > 0 ? (size) : 1))
#else
#define FSmalloc(size) malloc((size))
#endif

(plus similar for FScalloc & FSrealloc).

The +1 for the string-ending \0 byte ensures that the size will always be >0,
thus the difference doesn't matter.

--
        -Alan Coopersmith-              [email protected]
         Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to