Mail Archives: djgpp/1998/07/26/05:16:10
On Fri, 24 Jul 1998, grundmann wrote:
> I am writing an application that needs lots of memory
> How can i determin the amount of memory which i can allocate with malloc
> without getting a NULL pointer ?
The easiest way is to call `_go32_dpmi_remaining_virtual_memory' at
the very beginning of your program. This avoids the problems with the
internal free memory pool maintained by malloc/free, whose size you
cannot know (at the beginning of the program, this pool has a
negligible size).
Beware: some DPMI servers won't allow you to allocate all of the free
memory in a single large chunk. See the FAQ for details.
> Do i have to configure CWSDPMI sepcial to use 64 MB Ram ( or 96 MB
No. But you may need to configure your system to allow CWSDPMI access
to more than 64MB, since some memory managers limit the memory they
make available to programs.
- Raw text -