Click here to Skip to main content
12,299,603 members (50,484 online)

C / C++ / MFC

 
AnswerRe: Memory leak Pin
Richard Andrew x6425-Feb-13 10:11
memberRichard Andrew x6425-Feb-13 10:11 
GeneralRe: Memory leak Pin
a_matseevsky25-Feb-13 16:07
membera_matseevsky25-Feb-13 16:07 
GeneralRe: Memory leak Pin
Stephen Hewitt25-Feb-13 16:43
memberStephen Hewitt25-Feb-13 16:43 
GeneralRe: Memory leak Pin
Richard Andrew x6426-Feb-13 9:11
memberRichard Andrew x6426-Feb-13 9:11 
AnswerRe: Memory leak Pin
DavidCrow25-Feb-13 13:24
memberDavidCrow25-Feb-13 13:24 
AnswerRe: Memory leak Pin
Stefan_Lang26-Feb-13 4:04
memberStefan_Lang26-Feb-13 4:04 
GeneralRe: Memory leak Pin
a_matseevsky26-Feb-13 10:59
membera_matseevsky26-Feb-13 10:59 
GeneralRe: Memory leak Pin
Stefan_Lang26-Feb-13 22:44
memberStefan_Lang26-Feb-13 22:44 
GeneralRe: Memory leak Pin
a_matseevsky27-Feb-13 2:09
membera_matseevsky27-Feb-13 2:09 
GeneralRe: Memory leak Pin
Stefan_Lang27-Feb-13 2:52
memberStefan_Lang27-Feb-13 2:52 
GeneralRe: Memory leak Pin
a_matseevsky27-Feb-13 11:44
membera_matseevsky27-Feb-13 11:44 
Question[Solved] Memory leak in producer-consumer program Pin
noislude25-Feb-13 7:30
membernoislude25-Feb-13 7:30 
AnswerRe: Memory leak in producer-consumer program Pin
Richard Andrew x6425-Feb-13 10:08
memberRichard Andrew x6425-Feb-13 10:08 
GeneralRe: Memory leak in producer-consumer program Pin
noislude25-Feb-13 10:23
membernoislude25-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 Smile | :) .

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.
GeneralRe: Memory leak in producer-consumer program Pin
Richard Andrew x6425-Feb-13 10:33
memberRichard Andrew x6425-Feb-13 10:33 
GeneralRe: Memory leak in producer-consumer program Pin
noislude25-Feb-13 10:42
membernoislude25-Feb-13 10:42 
QuestionRe: Memory leak in producer-consumer program Pin
DavidCrow25-Feb-13 13:28
memberDavidCrow25-Feb-13 13:28 
AnswerRe: Memory leak in producer-consumer program Pin
noislude25-Feb-13 13:33
membernoislude25-Feb-13 13:33 
GeneralRe: Memory leak in producer-consumer program Pin
Stefan_Lang26-Feb-13 3:29
memberStefan_Lang26-Feb-13 3:29 
GeneralRe: Memory leak in producer-consumer program Pin
noislude26-Feb-13 8:07
membernoislude26-Feb-13 8:07 
GeneralRe: Memory leak in producer-consumer program Pin
Stefan_Lang26-Feb-13 22:21
memberStefan_Lang26-Feb-13 22:21 
GeneralRe: Memory leak in producer-consumer program Pin
noislude26-Feb-13 22:27
membernoislude26-Feb-13 22:27 
GeneralRe: Memory leak in producer-consumer program Pin
Stefan_Lang26-Feb-13 23:01
memberStefan_Lang26-Feb-13 23:01 
SuggestionRe: Memory leak in producer-consumer program Pin
noislude27-Feb-13 9:47
membernoislude27-Feb-13 9:47 
AnswerRe: Memory leak in producer-consumer program Pin
Vaclav_Sal25-Feb-13 17:45
memberVaclav_Sal25-Feb-13 17:45 
QuestionWhat is the MFC future Pin
Arris7425-Feb-13 7:06
memberArris7425-Feb-13 7:06 
AnswerRe: What is the MFC future Pin
Vaclav_Sal25-Feb-13 9:46
memberVaclav_Sal25-Feb-13 9:46 
GeneralRe: What is the MFC future Pin
Richard Andrew x6425-Feb-13 10:07
memberRichard Andrew x6425-Feb-13 10:07 
AnswerRe: What is the MFC future Pin
yu-jian25-Feb-13 21:30
groupyu-jian25-Feb-13 21:30 
GeneralRe: What is the MFC future Pin
Pete O'Hanlon26-Feb-13 3:30
protectorPete O'Hanlon26-Feb-13 3:30 
AnswerRe: What is the MFC future Pin
Stefan_Lang26-Feb-13 3:16
memberStefan_Lang26-Feb-13 3:16 
GeneralRe: What is the MFC future Pin
yu-jian26-Feb-13 17:44
groupyu-jian26-Feb-13 17:44 
AnswerRe: What is the MFC future Pin
_AnsHUMAN_ 27-Feb-13 1:42
group_AnsHUMAN_ 27-Feb-13 1:42 
AnswerRe: What is the MFC future Pin
Joe Woodbury4-Mar-13 12:00
memberJoe Woodbury4-Mar-13 12:00 
QuestionWere is a source of "sal.h" header file? Pin
Vaclav_Sal25-Feb-13 5:19
memberVaclav_Sal25-Feb-13 5:19 
AnswerRe: Were is a source of "sal.h" header file? Pin
Richard MacCutchan25-Feb-13 5:44
mvpRichard MacCutchan25-Feb-13 5:44 
GeneralRe: Were is a source of "sal.h" header file? Pin
Vaclav_Sal25-Feb-13 5:52
memberVaclav_Sal25-Feb-13 5:52 
GeneralRe: Were is a source of "sal.h" header file? Pin
SoMad25-Feb-13 6:39
memberSoMad25-Feb-13 6:39 
GeneralRe: Were is a source of "sal.h" header file? Pin
Vaclav_Sal25-Feb-13 9:21
memberVaclav_Sal25-Feb-13 9:21 
QuestionGoogle contacts from Visual Studio 2008 C++ desktop application Pin
Member 86892625-Feb-13 0:54
memberMember 86892625-Feb-13 0:54 
QuestionHow to resize a property sheet according to the DPI settings in MFC. Pin
mbatra3124-Feb-13 22:35
membermbatra3124-Feb-13 22:35 
AnswerRe: How to resize a property sheet according to the DPI settings in MFC. Pin
Richard MacCutchan25-Feb-13 0:22
mvpRichard MacCutchan25-Feb-13 0:22 
QuestionDisplaying Image from stream Pin
toms from newdelhi24-Feb-13 17:55
membertoms from newdelhi24-Feb-13 17:55 
AnswerRe: Displaying Image from stream Pin
SoMad24-Feb-13 18:58
memberSoMad24-Feb-13 18:58 
GeneralRe: Displaying Image from stream Pin
toms from newdelhi24-Feb-13 19:05
membertoms from newdelhi24-Feb-13 19:05 
GeneralRe: Displaying Image from stream Pin
SoMad24-Feb-13 19:10
memberSoMad24-Feb-13 19:10 
GeneralRe: Displaying Image from stream Pin
toms from newdelhi24-Feb-13 19:53
membertoms from newdelhi24-Feb-13 19:53 
GeneralRe: Displaying Image from stream Pin
SoMad24-Feb-13 20:18
memberSoMad24-Feb-13 20:18 
GeneralRe: Displaying Image from stream Pin
toms from newdelhi24-Feb-13 20:28
membertoms from newdelhi24-Feb-13 20:28 
GeneralRe: Displaying Image from stream Pin
SoMad24-Feb-13 21:31
memberSoMad24-Feb-13 21:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 29 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid