salloc.h

来自「一个编译器修改的例子」· C头文件 代码 · 共 22 行

H
22
字号
#ifndef SALLOC_H#define SALLOC_H#include <stdlib.h>extern void *safe_malloc(size_t size);    /* Does malloc(size) with null-pointer check.     * Deallocate with free().     */extern void *safe_realloc(void *ptr, size_t size);    /* Does realloc(ptr, size) with null-pointer check.     * Deallocate with free().     */extern char *safe_strdup(const char *string);    /* Returns a copy of string with null-pointer check.     * Deallocate with free().     */#endif

⌨️ 快捷键说明

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