#define _GNU_SOURCE
#define __USE_GNU
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "native-activity", __VA_ARGS__))
#define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "native-activity", __VA_ARGS__))
LOGI("malloc");
static void* (*my_malloc)(size_t) = NULL;
my_malloc = dlsym(RTLD_DEFAULT, "malloc");
LOGI("my_malloc=%d",(int)my_malloc);
return my_malloc(size);
}
No comments:
Post a Comment