1#include <malloc.h> 2#include <stdio.h> 3#include <stdlib.h> 4#include <string.h> 5#include "xpl_Memory.h" 6 7 8#ifdef __cplusplus 9extern "C" { 10#endif 11 12void * xplAllocMemEx(UINT32 bufsize, CPCHAR szFile, int nLine ) 13{ 14 char* ptr = (char*)malloc(bufsize); 15 if (ptr != 0) { 16 memset(ptr,0,bufsize); 17 } 18 return ptr; 19} 20 21void xplFreeMemEx(void *ptr, CPCHAR szFile, int nLine) 22{ 23 if (ptr) { 24 free( ptr ); 25 } 26} 27 28#ifdef __cplusplus 29} 30#endif 31 32