12,886,892 members (36,578 online)

# C / C++ / MFC

 Re: Memory leak a_matseevsky26-Feb-13 10:59 a_matseevsky 26-Feb-13 10:59
 Re: Memory leak Stefan_Lang26-Feb-13 22:44 Stefan_Lang 26-Feb-13 22:44
 Re: Memory leak a_matseevsky27-Feb-13 2:09 a_matseevsky 27-Feb-13 2:09
 Re: Memory leak Stefan_Lang27-Feb-13 2:52 Stefan_Lang 27-Feb-13 2:52
 Re: Memory leak a_matseevsky27-Feb-13 11:44 a_matseevsky 27-Feb-13 11:44
 [Solved] Memory leak in producer-consumer program noislude25-Feb-13 7:30 noislude 25-Feb-13 7:30
 Re: Memory leak in producer-consumer program Richard Andrew x6425-Feb-13 10:08 Richard Andrew x64 25-Feb-13 10:08
 Re: Memory leak in producer-consumer program noislude25-Feb-13 10:23 noislude 25-Feb-13 10:23
 Thank you for the greetings sir. First of all, I'd like to say that I'm a self taught person so... this thing of "do you think we are really going to do your homework for you?!" doesn't exist for me (did you know there are freaking bad colleges in the world?). Ah... I study in a college but the place where I study simply sucks (all my teachers try to hide the C implementation of the theory from us as much as they can and I mean ... always!). So, I decided to learn everything (as much as possible) from Computer Science by myself. So, please, take easy. I don't have a clue because I don't have anyone to teach me anything . Back to the code ... sorry if I didn't post the output: ```Produce: 1 Produce: 2 Consume: 2 Consume: 1 Consume: 0 ==2737== Thread 3: ==2737== Invalid write of size 1 ==2737== at 0x400D6C: consumer (prodcon.c:72) ==2737== by 0x4E38E0D: start_thread (in /lib64/libpthread-2.15.so) ==2737== Address 0x53f203f is 1 bytes before a block of size 10 alloc'd ==2737== at 0x4C2ABED: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==2737== by 0x400B6D: main (prodcon.c:24)``` ```==2737== LEAK SUMMARY: ==2737== definitely lost: 0 bytes in 0 blocks ==2737== indirectly lost: 0 bytes in 0 blocks ==2737== possibly lost: 0 bytes in 0 blocks ==2737== still reachable: 1,552 bytes in 4 blocks ==2737== suppressed: 0 bytes in 0 blocks``` I appreciate the help.
 Re: Memory leak in producer-consumer program Richard Andrew x6425-Feb-13 10:33 Richard Andrew x64 25-Feb-13 10:33
 Re: Memory leak in producer-consumer program noislude25-Feb-13 10:42 noislude 25-Feb-13 10:42
 Re: Memory leak in producer-consumer program DavidCrow25-Feb-13 13:28 DavidCrow 25-Feb-13 13:28
 Re: Memory leak in producer-consumer program noislude25-Feb-13 13:33 noislude 25-Feb-13 13:33
 Re: Memory leak in producer-consumer program Stefan_Lang26-Feb-13 3:29 Stefan_Lang 26-Feb-13 3:29
 Re: Memory leak in producer-consumer program noislude26-Feb-13 8:07 noislude 26-Feb-13 8:07
 Re: Memory leak in producer-consumer program Stefan_Lang26-Feb-13 22:21 Stefan_Lang 26-Feb-13 22:21
 Re: Memory leak in producer-consumer program noislude26-Feb-13 22:27 noislude 26-Feb-13 22:27
 Re: Memory leak in producer-consumer program Stefan_Lang26-Feb-13 23:01 Stefan_Lang 26-Feb-13 23:01
 Re: Memory leak in producer-consumer program noislude27-Feb-13 9:47 noislude 27-Feb-13 9:47
 Re: Memory leak in producer-consumer program Vaclav_Sal25-Feb-13 17:45 Vaclav_Sal 25-Feb-13 17:45
 What is the MFC future Arris7425-Feb-13 7:06 Arris74 25-Feb-13 7:06
 Re: What is the MFC future Vaclav_Sal25-Feb-13 9:46 Vaclav_Sal 25-Feb-13 9:46
 Re: What is the MFC future Richard Andrew x6425-Feb-13 10:07 Richard Andrew x64 25-Feb-13 10:07
 Re: What is the MFC future yu-jian25-Feb-13 21:30 yu-jian 25-Feb-13 21:30
 Re: What is the MFC future Pete O'Hanlon26-Feb-13 3:30 Pete O'Hanlon 26-Feb-13 3:30
 Re: What is the MFC future Stefan_Lang26-Feb-13 3:16 Stefan_Lang 26-Feb-13 3:16
 Last Visit: 31-Dec-99 18:00     Last Update: 25-Apr-17 9:26 Refresh « Prev1...429430431432433434435436437438 Next »