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