malloc.h
来自「标准c库代码,可以应用于各个系统提供了大量的基本函数」· C头文件 代码 · 共 47 行
H
47 行
#ifndef _MALLOC_H_#define _MALLOC_H_typedef _PTR mptr; /* a generic pointer, eg: (void *) *//* #define debug *//* #define rcheck */#define MSTATS/* * INT32 may be ugly, but we need to specify exactly this, and INT32 gets * the point across real quick. * FIXME: More work may be needed in this area. */#ifndef INT32#define INT32 int#endif#ifdef debug#include <assert.h>#define ASSERT(p) assert(p)#else#define ASSERT(p)#endif#ifndef NULL#define NULL 0#endif#ifdef rcheck#define MAGIC 0x55555555#endif#ifndef MALLOC_ALIGNMENT#define MALLOC_ALIGNMENT 4#endif#define ALIGN(x) (((x) + MALLOC_ALIGNMENT - 1) & ~(MALLOC_ALIGNMENT - 1))#ifdef rcheck#define OVERHEAD ALIGN(12) /* make sure the range checkers will fit */#else#define OVERHEAD ALIGN(4)#endif#endif /* _MALLOC_H_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?