www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/15/04:46:48

Date: Tue, 15 Apr 1997 11:40:14 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Anthony DOT Appleyard AT umist DOT ac DOT uk
cc: DJGPP AT delorie DOT com
Subject: Re: djgpp DLL's?; The generation gap
In-Reply-To: <F16E6D00CE@fs2.mt.umist.ac.uk>
Message-ID: <Pine.SUN.3.91.970415113940.12996B-100000@is>
MIME-Version: 1.0

On Mon, 14 Apr 1997, Anthony.Appleyard wrote:

> length. If I write two programs, A.EXE and B.EXE, can I do this?:-
>   A reserves some conventional memory and keeps its address in a variable x.
>   A writes varions matter to that conventional memory.
>   A calls B as a child process, and in a call parameter tells B the value of
> x.
>   B reads x from that parameter.
>   B looks for its data at conventional memory address x etseq.
>   B writes matter into conventional memory address x etseq.
>   B exits and returns to A.
>   A expects B's results to be at conventional memory address x etseq.
> 
>   Would that work?

Yes.  This is how DJGPP programs pass the long command line to their
DJGPP children, so it obviously works.

As long as you are sure that your programs will only run with DPMI 0.9
hosts (as opposed to DPMI 1.0), you can do the same in extended
memory, since under DPMI 0.9 the descriptors are shared.  Using
extended memory is better because there's usually more of it
available.

> Or is A's conventional memory allocation swopped out to
> disk while B is running?

Conventional memory is never swapped, because otherwise DOS could be
swapped also.  Swapping out DOS is an absolute no-no under DPMI,
because you cannot have a page fault inside a DOS call (DOS is
non-reentrant), and you *will* have it if DOS is not in memory when it
is called by the DPMI client.

- Raw text -


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