ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/24/23:45:15

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Pharlap 286
Date: Tue, 24 Jul 2001 22:17:05
Organization: Aspen Technology, Inc.
Lines: 28
Message-ID: <3b5df3e1.sandmann@clio.rice.edu>
References: <68C4CF842BD2D411AC1600902740B6DA02CDC45D AT mcoexc02 DOT mlm DOT maxtor DOT com>
NNTP-Posting-Host: dcloan.hou.aspentech.com
X-Trace: selma.aspentech.com 996031789 29079 10.32.115.107 (25 Jul 2001 03:29:49 GMT)
X-Complaints-To: postmaster AT aspentech DOT com
NNTP-Posting-Date: 25 Jul 2001 03:29:49 GMT
X-NewsEditor: ED-1.5.8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> The only way I can get [spawning a Pharlap286 application from
> within a DJGPP app] to work is to load the following statement in the
> config.sys:
> 
> Device=c:\emm386.exe RAM NOEMS
> 
> I believe this is because the Pharlap app cannot talk to the CWSDPMI host,
> but I don't know for sure.  (Using EMM386 forces the memory allocations to
> go through EMM386, not through the DPMI host, I think...) 

This is exactly correct.  When a DJGPP application loads it loads CWSDPMI.
If a VCPI memory provider is not provided CWSDPMI will allocate all the
XMS memory and manage it for DPMI applications.  If a non-32-bit-DPMI
protected mode application tries to run, it won't be able to get any XMS
memory (bad things can happen in the raw memory management world).  If
EMM386 is present, memory allocation goes through EMM386 which will pool
VCPI and XMS requests and provide mode switching services.

> This is highly undesirable, and I would love a way around it.  

No good way, but you could purposely write an application to look at XMS
memory, fragment it on purpose (by allocating say 1Mb, then 1Kb, then 
freeing the 1Mb) which would cause CWSDPMI to manage the larger block
leaving the smaller block potentially to the Pharlap application.  It 
might work, I haven't tried it recently.  You would need to know something
about the Pharlap application's memory needs and fragment the memory before
running the DJGPP application.  I could probably provide an example if
needed.

- Raw text -


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