diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2014-11-06 17:45:10 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2014-11-06 17:45:10 -0800 |
commit | 8e894b70a808ab91c183507b41e2bc5118078d6a (patch) | |
tree | b944d315951e7fe4684ba8367a1a8bbcf63eff79 /engine/xpl/src/xpl_Memory.cc | |
parent | 9e318853b2dca4c145d744b8b486684d93078724 (diff) | |
parent | a1eb49cd9cfa7b1d93fffb1846ba43439f55e567 (diff) | |
download | OMA-DM-8e894b70a808ab91c183507b41e2bc5118078d6a.tar.gz |
Diffstat (limited to 'engine/xpl/src/xpl_Memory.cc')
-rw-r--r-- | engine/xpl/src/xpl_Memory.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/engine/xpl/src/xpl_Memory.cc b/engine/xpl/src/xpl_Memory.cc new file mode 100644 index 0000000..c452cb4 --- /dev/null +++ b/engine/xpl/src/xpl_Memory.cc @@ -0,0 +1,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 + |