⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mem.h

📁 一套接口
💻 H
字号:
/* $Id: mem.h 6 2007-01-22 00:45:22Z drhanson $ */#ifndef MEM_INCLUDED#define MEM_INCLUDED#include "except.h"extern const Except_T Mem_Failed;extern void *Mem_alloc (long nbytes,	const char *file, int line);extern void *Mem_calloc(long count, long nbytes,	const char *file, int line);extern void Mem_free(void *ptr,	const char *file, int line);extern void *Mem_resize(void *ptr, long nbytes,	const char *file, int line);#define ALLOC(nbytes) \	Mem_alloc((nbytes), __FILE__, __LINE__)#define CALLOC(count, nbytes) \	Mem_calloc((count), (nbytes), __FILE__, __LINE__)#define  NEW(p) ((p) = ALLOC((long)sizeof *(p)))#define NEW0(p) ((p) = CALLOC(1, (long)sizeof *(p)))#define FREE(ptr) ((void)(Mem_free((ptr), \	__FILE__, __LINE__), (ptr) = 0))#define RESIZE(ptr, nbytes) 	((ptr) = Mem_resize((ptr), \	(nbytes), __FILE__, __LINE__))#endif

⌨️ 快捷键说明

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