Hacker News new | past | comments | ask | show | jobs | submit login

Maybe it's one of those non-standard free() functions that crashes if you give it a null pointer. A developer I once worked with said that he had gotten into the habit of "if(p) free(p);" because he'd work with such a system before.

(In case anyone is wondering: I can't think of a single commonly-used standard C library that doesn't accept null pointers to free(), i.e. the nullcheck is in the free() itself. Embedded systems, however, may vary widely in how closely they follow the standard.)




I downloaded some thing that purports to be the "Nintendo 64 SDK" and it says that its implementation of malloc cannot be accessed safely by multiple threads (there's an alternative function that does guarantee this). I think this might be it? (FYI: the free function does check for NULL.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: