DESCRIPTION
operation is performed.
The calloc() function allocates memory for an array of nmemb elements of size bytes each
and returns a pointer to the allocated memory. The memory is set to zero. If nmemb or
size is 0, then calloc() returns either NULL, or a unique pointer value that can later be
successfully passed to free().
RETURN VALUE
The malloc() and calloc() functions return a pointer to the allocated memory, which is
suitably aligned for any built-in type. On error, these functions return NULL. NULL may
also be returned by a successful call to malloc() with a size of zero, or by a successful
call to calloc() with nmemb or size equal to zero.
1 回答
不,不是的 . 你丢失了旧的记忆位置 .
再一次,不,它不会 . 你得到一个新的记忆位置 .
会有内存泄漏,因为无法再次访问它 .
你就在这里
手册页说: