Why should it be allowed to return a valid pointers anyways? Surely it should always return NULL?
replies(5):
malloc(0) is allowed to return non-NULL because the standard decrees it.
One way of thinking is that all mallocated pointers must always be freed exactly once. Then you're portable.