calloc.c

来自「基于4个mips核的noc设计」· C语言 代码 · 共 24 行

C
24
字号
/* * libc/stdlib/calloc.c * ANSI/ISO 9899-1990, Section 7.10.3.1. * * void *calloc(size_t nmemb, size_t size) * Allocate and zero memory. */#include <stdlib.h>void *calloc(size_t nmemb, size_t size){	register void *s;	size *= nmemb;	if ((s = malloc(size)) != NULL)		memset(s, 0, size);	return s;}/* end of calloc.c */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?