2019-07-28 10:31:56 +08:00
|
|
|
|
#ifndef ACL_MEM_HOOK_INCLUDE_H
|
2014-11-19 00:25:21 +08:00
|
|
|
|
#define ACL_MEM_HOOK_INCLUDE_H
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "acl_define.h"
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>䡢<EFBFBD>ͷŵ<EFBFBD>ע<EFBFBD>ắ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ACL<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><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>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
* @param malloc_hook {void *(*)(const char* fname, int lineno, size_t)}
|
|
|
|
|
* @param calloc_hook {void *(*)(const char* fname, int lineno, size_t, size_t)}
|
|
|
|
|
* @param realloc_hook {void *(*)(const char* fname, int lineno, void *, size_t)}
|
|
|
|
|
* @param strdup_hook {void *(*)(const char* fname, int lineno, const char*)}
|
|
|
|
|
* @param strndup_hook {void *(*)(const char* fname, int lineno, const char*, size_t)}
|
|
|
|
|
* @param memdup_hook {void *(*)(const char* fname, int lineno, const void *, size_t)}
|
|
|
|
|
* @param free_hook {void (*)(const char* fname, int lineno, void*)}
|
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_mem_hook(void *(*malloc_hook)(const char*, int, size_t),
|
|
|
|
|
void *(*calloc_hook)(const char*, int, size_t, size_t),
|
|
|
|
|
void *(*realloc_hook)(const char*, int, void*, size_t),
|
|
|
|
|
char *(*strdup_hook)(const char*, int, const char*),
|
|
|
|
|
char *(*strndup_hook)(const char*, int, const char*, size_t),
|
|
|
|
|
void *(*memdup_hook)(const char*, int, const void*, size_t),
|
|
|
|
|
void (*free_hook)(const char*, int, void*));
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* ȡ<EFBFBD><EFBFBD>֮ǰ<EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD>ڴ湴<EFBFBD>Ӻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD>Ϊȱʡ״̬
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_mem_unhook(void);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|