Mail Archives: djgpp/1999/06/10/03:56:56
On Wed, 9 Jun 1999, Dlanor Blytkerchan wrote:
> 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.
PMODE should work, but it disables virtual memory. Since you have a
memory-starved system, are you sure you want it?
> 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.
I don't follow. Which test sources did you donwload, and how are they
different from what your failing program does.
> 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.
`malloc' doesn't care much about the size of the chunk you are
requesting. The failure comes from passing the request via `sbrk' to
the DPMI server and, eventually, to the extended memory manager.
> 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.
Well, I have a real-life source called ``Emacs'' that allocates gobs
of memory in chunks that are usually much larger than 34KB, eventually
stabilizing at [checking] 25MB if I work long enough (this one was
running for a week without shutting it down), and I never had any
problems with it.
- Raw text -