提问人:mallo 提问时间:10/30/2023 最后编辑:Andrewmallo 更新时间:10/30/2023 访问量:24
TCMALLOC_PAGE_FENCE在 gperftools-2.1.90 及以上版本中不生效
TCMALLOC_PAGE_FENCE does not take effect in gperftools-2.1.90 and above versions
问:
我将 TCMALLOC_PAGE_FENCE 设置为 true,并在编译中添加了 --enable-frame-poin 选项。但是,它不起作用。
代码如下:
#include <unistd.h>
#include <string.h>
#include <stdio.h>
void foo(char* p){
memcpy(p, "01234567890abcdef", 16);
}
int main(int argc, char** argv){
char* p = new char[10];
foo(p);
return 0;
}
我尝试过 2.1.90 及更高版本,但找不到问题,但是,它可以在 2.1 版中识别出来。
答: 暂无答案
评论