TCMALLOC_PAGE_FENCE does not take effect in gperftools-2.1.90 and above versions

33 views Asked by At

I set TCMALLOC_PAGE_FENCE to true, and added the --enable-frame-poin option in the compilation. However, it does not work.

enter image description here

The code is as follows:

#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;
}

I've tried version 2.1.90 and above but couldn't find the problem, however, it is identifiable in version 2.1.

0

There are 0 answers