Daniel Lemire personal blog

In C, how do you know if the dynamic allocation succeeded?

In the C programming language, we allocate memory dynamically (on the heap) using the malloc function. You pass malloc a size parameter corresponding to the number of bytes you need. The function returns either a pointer to the allocated memory or the NULL pointer if the memory could not be allocated. Or so you may ……
Points
188
HN comments
193
Submissions
1
Cited by
0 commenters

Software Engineering2021

On Hacker News

SubmittedTitle on HNPointsComments
Nov 5, 2021In C, how do you know if the dynamic allocation succeeded? by ibobev188193

More from Daniel Lemire

All 87 posts →

Related posts from the same era