I have created 20 threads to read / write a shared file. I have synchronized the sources. Now my program works fine but when I run it with Valgrind, I get such errors:
LEAK summary: ** Definitely Lost: 0 block in blocks. \ ** Possibly lost: 624 bytes in 5 blocks ** ** still accessible: 1,424 bytes in 5 blocks. **** Pressed: 0 blocks in block 0. Accessible blocks (for whom an indicator was found) have not been shown to them. In addition to this, when I press Ctrl + C, it returns the same error
I have not malloced anything, but Valgrind still complains.
Any suggestion would be appreciated.
You can run valgrind --leak-check = full ./prog_name to ensure that These accessible blocks can not destroy anything in your program. Many times, starting a library, without locking or destroying libcurl, will cause leaks. If there is nothing that you have control then you can write a suppression file. Section 4.4 contains some information and a link for some examples
Comments
Post a Comment