Mail Archives: djgpp/1999/06/09/18:01:40
>> In response to the suggestion of running go32-v2 from within the program.
>> I've done that just now. The error is still the same. go32-v2 reports just
>> below 2 MBs of free DPMI memory available, and several MBs of swap space.
>Weird. Please post the shortest program that exhibits this problem on
>your system, and also the command line you used to compile and link it.
The shortest program that exhibits this error would be the only program
that exhibits this error - as there is only one. It's complete source -
including that of the VGAP libraries it uses, is rather lengthy though, so
I won't post it here. It wouldn't help much anyway: it's exact structure is
irrelevant to solve the problem at hand. I've already posted the part of
the code that causes the problem. In the mean time, I have tried something
else: I've tried using malloc in the simplest form possible:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char *prr;
if ((prr = malloc(34 * 1024)) != NULL) {
free(prr);
} // if
return(0);
} // main()
The weird thing is, though it does the same thing, it does not produce the
error. The only diffirence is the VGAP library being linked in. Removing it
(the library) from the program itself does not remove the error, even
though it does exactly the same as the source above (and I do mean exactly
the same).
>Where did you invoke go32-v2, exactly? Was that in the same place where
>the offending malloc was returning the NULL pointer, or somewhere else?
In the actual program, go32-v2 is invoked right before the malloc()
statement. I've tried it with and without seporatly invoking CWSDPMI from
the program as a child process - that only makes RHIDE crash, but does not
solve the problem.
I have decided to simply rewrite the program from scratch to what it is
now, testing it at every statement I put in (i.e. I'll comment out
everything and let them back in one by one). Once it starts producing the
error, it will have been localized to the method invoked, which will be
removed until a better one can take it's place.
Greetz!
Dlanor
- Raw text -