This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why was a malloc with heap_size = 0 successful?

We started with the default project that have no heap. Added mallocs to the system and they seemed to succeed, without realizing heap was set to 0. They did not return NULL.

I would have expected the mallocs to fail since there is no heap at all.

Can anyone explain why the malloc succeeded?

Related