Valgrind with more patchs, now valgrind can calculate memory malloced in a special time stage.