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

📄 mmm.h

📁 SVMcfg: Learns a weighted context free grammar from examples. Training examples (e.g. for natural la
💻 H
字号:
/* mmm.h
 *
 * Mark's memory manager
 *
 * Defines CALLOC, MALLOC, REALLOC and FREE, which are just like the
 * standard versions, except that these do varying amounts
 * of sanity checking, depending on the value of NDEBUG.
 *
 * If NDEBUG is defined, they merely check that the memory is actually
 * allocated, and throw an error if it is not.
 *
 * If NDEBUG is not defined, then in addition they:
 *
 *  * check blocks for sanity
 *  * provide a sentinel at either end, and check that it has not been overwritten
 *  * track the number of allocated blocks and allocated bytes
 */

#include <stdlib.h>

extern	long	mmm_blocks_allocated;

#define CALLOC(n,m)	mmm_calloc(n,m)
#define MALLOC(n)	mmm_malloc(n)
#define REALLOC(x,n)	mmm_realloc(x,n)
#define FREE(x)		mmm_free(x)

void *mmm_calloc(size_t count, size_t size);
void *mmm_malloc(size_t n);
void *mmm_realloc(void *ptr, size_t size);
void mmm_free(void *ptr);

⌨️ 快捷键说明

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