Mail Archives: djgpp/1999/06/09/08:57:03
>>>> When I started the program it died with "Load error: no
>>>> DPMI memory".
>>>This is one more evidence that your system runs out of memory somehow.
>>>This message is printed when the stub loader cannot allocate enough
>>>memory to load the code and static data of your program.
>> .. which it probably tries to do with malloc()
>No, the startup code uses direct DPMI calls to get the memory at that
>stage, since the program's segments are not yet set up, and so calling
>`malloc' would crash immediately.
OK. But that still leaves the same problem. I'm thinking of going around it
by stubifying my program and putting it in pmodstub.exe - if I understand
the docs correctly, that should work. A weird thing is, though, that the
test sources I downloaded from simtel for DJGPP, where malloc() is also
used without calling CWSDPMI externally first, do work. My only remaining
idea for the cause of this problem is that malloc simply won't do anything
as "large" as 34K from the program I'm writing: trying it with a smaller
struct does work. I am now convinced that it is not a lack of memory that
is at fault here: I've called go32-v2 as well as mem to see how much memory
I've got left - it is still far more than the 34 K I want.
If anyone has some real-life source that does this and does work,
preferably ANSI C, but C++ will do as well, I would be much obliged.
Greetz!
Dlanor
- Raw text -