malloc_util.h

来自「机器人足球AI设计比赛」· C头文件 代码 · 共 34 行

H
34
字号
/** * malloc_util.h : malloc debugging routines *  * written by erik a. hendriks (hendriks@lanl.gov). * * Copyright 2002 Erik Arjan Hendriks. * This software may be used and distributed according to the terms of the  * GNU Public License, incorporated herein by reference.  */#ifndef _MALLOC_UTIL_H_#define _MALLOC_UTIL_H_#include <sys/types.h>/*-- Memory debugging stuff --*/void  x_init_alloc(void);void  x_check_point_count(void);void  x_inc_check_point(void);void *x_malloc(char *, int, size_t);void  x_free  (char *, int, void *);char *x_strdup(char *, int, char *);#ifdef _DEBUG_MALLOCS_#define malloc(x) x_malloc(__FILE__, __LINE__, (x))#define safe_malloc(x) x_malloc(__FILE__, __LINE__, (x))#define free(x)   x_free  (__FILE__, __LINE__, (x))#define strdup(x) x_strdup(__FILE__, __LINE__, (x))#endif#endif

⌨️ 快捷键说明

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