Add checks for malloc(0)
Check all circumstances where malloc(0)
could occur and handle them properly since it is implementation dependent.
Usually this should not be an issue, since zero sized allocs should be prevented by other logic, e.g. size of global communicator > 0.