[LLVMdev] malloc(), free(), and alloca() with zero size

Jon Sargeant delta17 at cox.net
Sat Oct 6 09:14:19 PDT 2007


If <NumElements> is zero, what is the behavior of malloc() and alloca()?
Can I call free() using the pointer that malloc() returns?

Also, I'm assuming that free()ing a null pointer is a legal NOP?

Regards,
Jon



More information about the llvm-dev mailing list