2019-07-28 10:31:56 +08:00
|
|
|
|
#pragma once
|
2017-06-02 14:47:24 +08:00
|
|
|
|
#include "../acl_cpp_define.hpp"
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
#ifdef HOOK_NEW
|
|
|
|
|
|
2015-06-29 17:33:11 +08:00
|
|
|
|
#if defined(_WIN32) || defined(_WIN64)
|
2014-11-19 00:25:21 +08:00
|
|
|
|
# ifdef NDEBUG
|
|
|
|
|
void* operator new(size_t n);
|
|
|
|
|
void operator delete(void *p);
|
|
|
|
|
# endif
|
|
|
|
|
#else
|
|
|
|
|
#include <new>
|
|
|
|
|
void* operator new(size_t n) throw (std::bad_alloc);
|
|
|
|
|
void operator delete(void *p) throw();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
namespace acl {
|
|
|
|
|
|
|
|
|
|
ACL_CPP_API void acl_slice_init(void);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>亯<EFBFBD><EFBFBD>
|
|
|
|
|
* @param size {size_t} <EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijߴ<EFBFBD><EFBFBD><EFBFBD>С
|
|
|
|
|
* @param filename {const char*} Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param funcname {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param lineno {int} Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>
|
|
|
|
|
* @return {void*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD>abort
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_CPP_API void* acl_new(size_t size, const char* filename,
|
|
|
|
|
const char* funcname, int lineno);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>ͷ<EFBFBD><EFBFBD>ڴ溯<EFBFBD><EFBFBD>
|
|
|
|
|
* @param ptr {void*} <EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD>ַ
|
|
|
|
|
* @param filename {const char*} Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param funcname {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param lineno {int} Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_CPP_API void acl_delete(void *ptr, const char* filename,
|
|
|
|
|
const char* funcname, int lineno);
|
|
|
|
|
|
|
|
|
|
}
|