mymalloc.cpp
来自「游戏编程精华02-含有几十个游戏编程例子」· C++ 代码 · 共 29 行
CPP
29 行
/****************************************************************************
* mymalloc.cpp - malloc wrapping functions with logging
*
* (c) Copyright 2000 Sabarasa Entertainment
* For internal use only.
****************************************************************************/
#include <malloc.h>
#include "fplog.h"
void *
mymalloc( size_t size, char * string )
{
void * lpRet;
lpRet = malloc( size );
fplog( "+ %s %d %d\n", string, lpRet, size );
return lpRet;
}
void
myfree( void *a, char * string )
{
free( a );
fplog( "- %s %d\n", string, a );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?