分配零内存Allocating Zero Memory

ANSI 4.10.3 请求的大小为零时,callocmallocrealloc 函数的行为ANSI 4.10.3 The behavior of the calloc, malloc, or realloc function if the size requested is zero

callocmallocrealloc 函数接受零作为参数。The calloc, malloc, and realloc functions accept zero as an argument. 不分配实际内存,但会返回有效的指针,并且之后可通过 realloc 修改内存块。No actual memory is allocated, but a valid pointer is returned and the memory block can be modified later by realloc.

另请参阅See Also

库函数Library Functions