acl/lib_acl/include/stdlib/acl_mem_hook.h

39 lines
1.4 KiB
C
Raw Normal View History

#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"
/**
* <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*));
/**
* ȡ<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