delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/28/19:50:26

From: salomon AT uni-wuppertal DOT de (Winfried Salomon)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: malloc() and CWSDPMI 4.0
Date: Wed, 28 Jul 1999 23:17:49 GMT
Organization: University of Wuppertal
Lines: 58
Message-ID: <379f88e7.27678013@news.uni-wuppertal.de>
References: <378bbab9 DOT 22414525 AT news DOT uni-wuppertal DOT de> <378CB591 DOT 82CC6753 AT americasm01 DOT nt DOT com> <378e1f70 DOT 6963482 AT news DOT uni-wuppertal DOT de> <378E3E83 DOT 144617B0 AT americasm01 DOT nt DOT com> <3790dc42 DOT 950074 AT news DOT uni-wuppertal DOT de> <37933e48 DOT sandmann AT clio DOT rice DOT edu>
NNTP-Posting-Host: uni-at-home42.dialin.uni-wuppertal.de
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019