I'm using valgrind's memcheck on my soft;But I have problems in this: for some reason we will transform the malloced pointer before store,and transform back when use.Just like this:
char* ptr = (char*)malloc(1);
ptr = ptr + 1;
......
origin_ptr = ptr -1;
free(origin_ptr);
ptr = ptr + 1; <------ this will make valgrind to report memory lost;