jnew.h

来自「c语言库函数!里面包含了所以c语言中的系统函数的实现及其详细说明和代码!请大家及」· C头文件 代码 · 共 35 行

H
35
字号
/* +++Date last modified: 05-Jul-1997 */

/*--------------------------------------------------------------*/
/* Debugging extension by Jeff Dunlop                           */
/* Copyright 1992-1993, DB/Soft Publishing Co.                  */
/* License is hereby granted for use of JMalloc as a debugging  */
/* aid in any program.  JMalloc may not be sold or distributed  */
/* as or part of any for-profit debugging program or library    */
/* nor may it be included in any for-profit library that offers */
/* debugging features.  Any redistribution of JMalloc source    */
/* must include this copyright notice.                          */
/*--------------------------------------------------------------*/

#include <stdlib.h>

#ifndef jnew_h
#define jnew_h

#ifdef DBUG

#define NEW(a) (db_set(__FILE__, __LINE__), new a)
#define DELETE(a) (db_set(__FILE__, __LINE__), delete a)

void *operator new(size_t n);
void operator delete(void *p);
void db_set(char *file, int line);

#else

#define NEW(a) new a
#define DELETE(a) delete a

#endif /* DBUG */
#endif /* jnew_h */

⌨️ 快捷键说明

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