Mail Archives: djgpp/2002/07/17/10:50:38
Patrick Chen <pck66 AT pd DOT jaring DOT my> wrote:
: I am using Rhide IDE and having problem allocating memory. The graphic
: display program involve the following segment which I suspect could be the
: problem.
: The program run ok just once, then after exit with return 0 from main(good
: status), it couldn't be executed a second time from Rhide. The Rhide get
: hanged, mouse cannot activate any menu command at all. Have to quit Rhide
: and run the program again. Sometimes the error bin/ld.exe cannot find
: svga02.exe appear and need to restart the computer again. Even the
: free(offscreen) at the end does not make a difference.
Sounds like
1. Really bad bug in your program
or perhaps
2. If you're using WNT, W2k or WXP, this could be a problem with RHIDE.
The solution to 1 is running in plain DOZE and you'll probably get a
lot of crashes that WINDOZE is designed to ignore.
The solution to 2 (from my perspective) is that you state which
WINDOZE version you're using.
: Hope some of you can help in solving this. Is this a legal operation for
: 640*480 size?
: byte *offscreen;
: offscreen= (byte*)malloc((640*480)*sizeof(byte));
: ..
: ..
: free(offscreen)
Stricly speaking, without knowing what kind of type byte is, we can't
tell. _If_ it's (unsigned) short, that would be right, I think.
Right,
MartinS
- Raw text -