2014-11-19 00:06:40 +08:00
|
|
|
|
#ifndef ACL_MEM_HOOK_INCLUDE_H
|
|
|
|
|
#define ACL_MEM_HOOK_INCLUDE_H
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "acl_define.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <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>
|
|
|
|
|
* @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*));
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ȡ<EFBFBD><EFBFBD>֮ǰ<EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD>ڴ湴<EFBFBD>Ӻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD>Ϊȱʡ״̬
|
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_mem_unhook(void);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|