Click here to Skip to main content
15,879,535 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: dividing image into blocks Pin
Christian Graus9-Jan-06 11:57
protectorChristian Graus9-Jan-06 11:57 
GeneralRe: dividing image into blocks Pin
Mareo_4219-Jan-06 12:50
Mareo_4219-Jan-06 12:50 
GeneralRe: dividing image into blocks Pin
Christian Graus9-Jan-06 12:55
protectorChristian Graus9-Jan-06 12:55 
AnswerRe: dividing image into blocks Pin
__yb10-Jan-06 19:41
__yb10-Jan-06 19:41 
Questionprogram wont enter main()-function until character input is given Pin
maladuk9-Jan-06 10:22
maladuk9-Jan-06 10:22 
QuestionRe: program wont enter main()-function until character input is given Pin
David Crow9-Jan-06 10:30
David Crow9-Jan-06 10:30 
AnswerRe: program wont enter main()-function until character input is given Pin
maladuk10-Jan-06 10:21
maladuk10-Jan-06 10:21 
Questionmalloc causing program crash Pin
KellyR9-Jan-06 9:47
KellyR9-Jan-06 9:47 
Hi,

I was just wondering if anyone else has ever seen this problem, and might be aware of a fix for it:

I'm calling malloc in a recursive fuction I recently wrote, and it gets called a ton of times very quickly, could be 1-2k times or more per fraction of a second.

For some reason, if I have it call too many times, the program crashes. If I lower the bounds of the recursive exit slightly, then I can get it to work most of the time. Lowering the bounds further will result in the program working 100% of the time, but I don't get the results I need (it needs to be very precise).

Of course the first instinct is to assume I'm running out of memory, but no, that is not the case, I'm calling malloc on tiny tiny portions of memory and when the program crashes it's normally only using between 1700 and 3500K of RAM.

The program is actually crashing inside of malloc so there isn't much I can do about the function itself, it doesn't even get to the return.

I tried placing sleep calls into the function but this strategy didn't work, as well as causing the function call to take horrendously long amounts of time to run.

Any ideas?
Thanks!

Kelly Ryan
AnswerRe: malloc causing program crash Pin
David Crow9-Jan-06 10:07
David Crow9-Jan-06 10:07 
AnswerRe: malloc causing program crash Pin
PJ Arends9-Jan-06 10:09
professionalPJ Arends9-Jan-06 10:09 
GeneralRe: malloc causing program crash Pin
KellyR9-Jan-06 10:16
KellyR9-Jan-06 10:16 
GeneralRe: malloc causing program crash Pin
mcljava12-Jan-06 19:01
mcljava12-Jan-06 19:01 
QuestionMaking a Simple Installation CD. Pin
jerry1211a9-Jan-06 7:26
jerry1211a9-Jan-06 7:26 
AnswerRe: Making a Simple Installation CD. Pin
Rage9-Jan-06 8:09
professionalRage9-Jan-06 8:09 
AnswerRe: Making a Simple Installation CD. Pin
ddmcr9-Jan-06 9:04
ddmcr9-Jan-06 9:04 
AnswerRe: Making a Simple Installation CD. Pin
ThatsAlok9-Jan-06 19:31
ThatsAlok9-Jan-06 19:31 
GeneralRe: Making a Simple Installation CD. Pin
Rage9-Jan-06 21:29
professionalRage9-Jan-06 21:29 
AnswerRe: Making a Simple Installation CD. Pin
Ravi Bhavnani10-Jan-06 7:40
professionalRavi Bhavnani10-Jan-06 7:40 
QuestionRetrieve output of console app? Pin
Cpt Rick9-Jan-06 5:05
Cpt Rick9-Jan-06 5:05 
AnswerRe: Retrieve output of console app? Pin
jhwurmbach9-Jan-06 5:25
jhwurmbach9-Jan-06 5:25 
AnswerRe: Retrieve output of console app? Pin
Rage9-Jan-06 6:00
professionalRage9-Jan-06 6:00 
AnswerRe: Retrieve output of console app? Pin
Taka Muraoka9-Jan-06 6:14
Taka Muraoka9-Jan-06 6:14 
AnswerRe: Retrieve output of console app? Pin
David Crow9-Jan-06 10:10
David Crow9-Jan-06 10:10 
AnswerRe: Retrieve output of console app? Pin
kakan9-Jan-06 19:14
professionalkakan9-Jan-06 19:14 
AnswerRe: Retrieve output of console app? Pin
Cpt Rick10-Jan-06 1:11
Cpt Rick10-Jan-06 1:11 

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.