提交 f7187fbd 编写于 作者: Z zhang-cui11

Malloc hook instruction optimization

Signed-off-by: Nzhang-cui11 <zhangcui11@huawei.com>
上级 c09d0343
......@@ -730,14 +730,14 @@ template("musl_libs") {
"//build/config/compiler:compiler",
":soft_hook",
]
}
cflags = [
"-mllvm",
"--instcombine-max-iterations=0",
"-ffp-contract=fast",
"-O3",
]
cflags = [
"-mllvm",
"--instcombine-max-iterations=0",
"-ffp-contract=fast",
"-O3",
]
}
source_set("soft_musl_jemalloc") {
sources = [ "./porting/linux/user/src/malloc/jemalloc/jemalloc.c" ]
......
......@@ -18,7 +18,7 @@ void* malloc(size_t bytes)
if (!__get_global_hook_flag()) {
return MuslFunc(malloc)(bytes);
}
else if (!__get_hook_flag()) {
if (!__get_hook_flag()) {
return MuslFunc(malloc)(bytes);
}
return dispatch_table->malloc(bytes);
......@@ -39,7 +39,7 @@ void free(void* mem)
MuslFunc(free)(mem);
return;
}
else if (!__get_hook_flag()) {
if (!__get_hook_flag()) {
MuslFunc(free)(mem);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册