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
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Nov 5, 2021 | In C, how do you know if the dynamic allocation succeeded? by ibobev | 188 | 193 |