Version 2 (modified by 9 years ago) ( diff ) | ,
---|
Inspector Brief Tutorial
Sample code
#include <stdio.h> #include <stdlib.h> int main() { double * p = malloc(sizeof(double) * 10); if (p[0] < 1) { printf("p[0] < 1\n"); } else { printf("p[1] >= 1\n"); } return 0; }
[fuji@cypress01-089 ~]$ module load intel-psxe/2015-update1 [fuji@cypress01-089 Valgrind]$ icc -g uninit.c [fuji@cypress01-089 Valgrind]$ inspxe-cl -collect=mi2 -app-working-dir=$PWD -result-dir=$PWD/results $PWD/a.out p[0] < 1 1 new problem(s) found 1 Memory leak problem(s) detected [fuji@cypress01-089 Valgrind]$ inspxe-cl -R problems -r $PWD/results P1: Error: Memory leak: New P1.3: Error: Memory leak: 80 Bytes: New /home/fuji/svn/workshop/Valgrind/uninit.c(5): Error X3: Allocation site: Function main: Module /home/fuji/svn/workshop/Valgrind/a.out
Note:
See TracWiki
for help on using the wiki.