infinitetrutles
Electrical
- Oct 9, 2006
- 2
Hi,
I am having an issue where allocating memory is not returning focus to my code. the call to malloc is made and the processor is running the program at 100%, but my program makes no further progress. is this an infinite loop inside the malloc code?
I currently have the code:
printf("about to allocate %d bytes\n", length);
song[quality] = malloc(length);
printf("malloc completed\n");
when executed this code gets executed a few times inside a loop and things go acording to plan untill i get the output "about to allocate 16 bytes" and then nothing further happens.
I doubt my application has run out of memory as it happens early in the program when not much has been allocated yet, and even then malloc should return an error message. I have also turned off the "enable over commit memory" feature on my computer as i thought maybe that could be the cause.
has anyone seen something simillar before? Thanks,
Dave
I am having an issue where allocating memory is not returning focus to my code. the call to malloc is made and the processor is running the program at 100%, but my program makes no further progress. is this an infinite loop inside the malloc code?
I currently have the code:
printf("about to allocate %d bytes\n", length);
song[quality] = malloc(length);
printf("malloc completed\n");
when executed this code gets executed a few times inside a loop and things go acording to plan untill i get the output "about to allocate 16 bytes" and then nothing further happens.
I doubt my application has run out of memory as it happens early in the program when not much has been allocated yet, and even then malloc should return an error message. I have also turned off the "enable over commit memory" feature on my computer as i thought maybe that could be the cause.
has anyone seen something simillar before? Thanks,
Dave