Mail Archives: djgpp/1999/07/19/14:55:25
Winfried Salomon wrote:
> Hello Rolf,
>
> > There is a different version of the dpmi server that doesn't use virtual
> >memory, you can bind your executable with this.
> yes, I have used CWSDPR0.EXE, but then i allocate with malloc() 64 MB
> and without 32 MB, although I habe 96 MB Ram and I must examine the
> reason.
OK, I'm not sure if I understand what you are saying, but I'm guessing you
meant that you can only allocate 64 Megs and any attempt to get higher fails.
If that is the problem, then I have an idea. If you use sbrk() to allocate
memory, you can get it 1 byte at a time, without worrying about malloc headers
or rounding up to a power of 2 stuff (I don't know if that is still a problem in
the current version). Either way, you can store the value of "sbrk(0)" into a
"char*", then continuously call "sbrk(1)" until it returns an error value. When
it returns an error, that means that your original "char*" now points to all
available ram.
--
-Rolf Campbell (39)3-6318
- Raw text -