Anybody had problems debugging large-heap applications using
the CW Pro 3 integrated IDE/de*?
I have several programs with large arrays (75-150MB) declared
as heap globals, not pointers to malloc()'ed memory. The
CW Pro 2 de* doesn't have any problems debugging these
applications, but the CW Pro 3 IDE/de* brings up the
debugging "Thread 0x64" window and then just sits there with
a wait cursor. After 30 minutes, still no sign of activity.
The programs run fine, as long as I don't invoke the de*.
Changing the array declarations to pointers with calloc()'s
to grab the memory makes the problem go away, but this isn't
what I want to do. I've tried starting the IDE with 100MB
RAM allocated to it, and it gets farther along in the debugging
process (i.e., it brings up the source code window now), but
still hangs up.
This is just plain old C code, no MacOS Toolbox calls or
anything. I'll file a bug report if I don't hear from anybody
about this. (If you try the example, be sure to set the
Target:Heap Size to 70000 or so.)
/* fatboy sample code */
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#define too_many 8000000
double fatboy[too_many];
/* double* fatboy; */
int main(void)
{
fprintf(stdout, "starting...\n");
/*
fatboy = (double*) calloc(too_many, sizeof (double));
if (fatboy == NULL) {
fprintf(stdout, "error allocating fatboy[]\n");
exit(1);
}
*/
fatboy[0] = 0.0;
fprintf(stdout, "finished.\n");
return 0;
--Quote:}
--
Doug Frick