Mail Archives: djgpp/1999/07/28/19:50:26
Hello Charles,
>
>This may be a limitation of what you have in the config.sys :
> HIMEM.SYS, EMM386.SYS (or commercial enhanced versions - QEMM, 386MAX)
> Without HIMEM.SYS you are limited to 64Mb. To access more than 64Mb you
> *must* have HIMEM.SYS from Win95 or Win98 in your config.sys!
> With EMM386 you may be limited to 16Mb, 32Mb or some amount based on which
> version you have. I recommend removing EMM386 or using the NOEMS NOVCPI
> keywords.
I followed your advice and booted only with himem.sys from Win98, but
I can only access 32 MB with CWSDPR0. I tried following program
example:
==============================
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <dpmi.h>
#include <unistd.h>
main()
{
char *buf;
/* allocate memory for string */
i=0;
buf =(char*)sbrk(0); /* allocate space */
printf("%s%12d\n","buf = ",buf);
do {
i++;
}
while((char*)sbrk(1)!=(char*)-1);
printf("%s%12d\n","i = ",--i);
return;
} /*end main*/
=================================
When I run this program in DOS-Box of Win98, I get all the 96 MB, but
I don't know if it is virtual memory. Under plain DOS 7.10 (booted
from disk) I get 64 MB without CWSDPR0 and 32 MB with it.
I don't understand this because I don't know where the DPMI in DOS
comes from.
An other experiment with
phys_mem=_go32_dpmi_remaining_physical_memory();
was also not very successfull, it is a similar behaviour as sbrk() and
under DOS there is only 64 MB shown.
Greetings, Winfried
- Raw text -