Talk:C Programming/Memory Management
In C, the return from malloc should NOT be cast to a type; that is incorrect and it is considered a bad practice! In C++ it is the correct practice, in C it is not. This battle was fought in the 1980s and it is not still being fought; there is a single clear answer, and that is that it is incorrect to cast the return value from malloc().126.96.36.199 (discuss) 20:46, 16 January 2019 (UTC)
Warning under "Allocating Memory"[edit source]
Current version is :
"which won't allocate any memory for you. Worse, it might return a null pointer, but that's not guaranteed. This means that it's possible"
Should this read:
"which won't allocate any memory for you. Worse, the null pointer is not guaranteed. It might return a valid pointer to 0 bytes. This means that it's possible"