Related searches:

Search whole site:

Search title: I have been trying to understand what malloc(0) does, but it seems to behave just like malloc(1). I can see an actual pointer, it isn't NULL and I can write data to that memory location. What does a zero-length allocation actually do?

See how to search.