xmalloc.c
来自「linear time-frequency toolbox」· C语言 代码 · 共 38 行
C
38 行
#if HAVE_CONFIG_H# include <config.h>#endif#include "common.h"void *xmalloc (size_t num){ void *new = malloc (num); if (!new) sic_fatal ("Memory exhausted"); return new;}void *xrealloc (void *p, size_t num){ void *new; if (!p) return xmalloc (num); new = realloc (p, num); if (!new) sic_fatal ("Memory exhausted"); return new;}void *xcalloc (size_t num, size_t size){ void *new = xmalloc (num * size); bzero (new, num * size); return new;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?