Hi guys, I am developing an app, and at the state it is, i am looking now to details...
I tried valgrind-3.8.1, on Debian amd_64. struct record{ uint8_t data_size; uint8_t rec_type; uint16_t addr; uint8_t *data; uint8_t checksum; }; struct holder{ uint32_t nrecords; struct record *records; }; struct holder blahhh = {0, NULL); blahhh.records = ( struct record *) calloc( sizeof( struct record ), holder.nrecords ); blahhh.records[ record_no ].data = calloc( record_len, 1 );//I alloc an amount of record data chars when i freed the mem i free everithyng free(blahhh.records[ record_no ].data); free(blahhh.records); my problem is.. I run : valgrind ./program and I get lots of unitialized blocks :S .. .... ..... ==24106== Use of uninitialised value of size 8 ==24106== at 0x40A9ED: _int_free (in /home/tuxd3v/Desktop/geany/lypus_parser/parsers) ==24106== by 0x401782: ihx_close (ihx.c:162) ==24106== by 0x401E2C: main (main.c:18) ==24106== ==24106== Use of uninitialised value of size 8 ==24106== at 0x40ACC0: _int_free (in /home/tuxd3v/Desktop/geany/lypus_parser/parsers) ==24106== by 0x401782: ihx_close (ihx.c:162) ==24106== by 0x401E2C: main (main.c:18) ==24106== ==24106== ==24106== HEAP SUMMARY: ==24106== in use at exit: 0 bytes in 0 blocks ==24106== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==24106== ==24106== All heap blocks were freed -- no leaks are possible how can total heap be: total heap usage: 0 allocs, 0 frees, 0 bytes allocated ??? even with "valgrind --tool=memcheck ./program" i get the same :( does any one knows how to track the mallocs and free ?? thanks in advance regards, tux ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users