Chapter 7: Allocating memory: xmalloc ()
Society for Industrial and Applied Mathematics eBooks · 2014
7.1 ▪ Introduction The C standard library's malloc function, declared in the header file stdlib.h, allocates a contiguous block of memory of the requested size (in bytes) and returns a void pointer (cf. Section 4.3) that points to the beginning of the block. The request may fail if the requested amount is greater than what's available. In that case malloc returns NULL.