I'm checking memory allocation with poolmon for a C application, after uninstall it still have 1 allocation with zero bytes. Can this be considered as a memory leak?
Asked
Active
Viewed 81 times
0
-
3Yes, since `malloc(0)` is not required to return `NULL`. – EOF Sep 12 '16 at 21:26
-
did you check the heap before you did any allocations? – Serge Sep 12 '16 at 21:27
1 Answers
1
It's an implementation defined.
But even malloc(0) must be free()'d.

a1batross
- 11
- 1
-
1"malloc(0) must be free()'d" if the result is not `NULL`. – chux - Reinstate Monica Sep 12 '16 at 22:31