[comp.sys.ibm.pc] Extended memory questions

dcd@tc.fluke.COM (David Dyck) (08/30/88)

Any Extended Memory 'experts' out there?

Is there a accepted standard method for using and sharing extended memory?

I know of INT 15/87 to move date to/from extended memory,
and INT15/88 to obtain total extended memory size.

Is there any way to tell if another application/ram disk/etc
is using part of the extended memory?

I am using a program like VDISK that will
allow some of extended memory to be used as a ram disk.

I also want to have a driver utilize some of the unused extended memory.
If my driver is loaded before VDISK, how would I/it inform VDISK 
that some of the extended memory was already in use?
And what if VDISK loaded first,
is there a way for my driver to determine how much memory VDISK was using?

Should all extended memory applications/drivers allow the
user to specify the upper/lower bounds in extended memory?

I just finished a trial and error method of trying to get 
two applications that both use extended memory to co-exist
(A disk cache driver, and a ram disk).

Thanks for any information,

            David Dyck
    Domain: dcd@tc.fluke.COM
     Voice: +1 206 356 5807
      UUCP: {uw-beaver,decwrl,microsof,sun}!fluke!dcd
     Snail: John Fluke Mfg. Co. / P.O. Box C9090 / Everett WA  98206

scjones@sdrc.UUCP (Larry Jones) (08/31/88)

In article <5003@fluke.COM>, dcd@tc.fluke.COM (David Dyck) writes:
> Is there a accepted standard method for using and sharing extended memory?

No.  The cleverest idea I have heard to date is to take the amount of memory
you need from the END of the extended memory and establish your own INT 15
handler to correct the "total" extended memory size reported to anyone
coming after you.  Since not everyone follows this scheme (notably IBM's
VDISK which has it's own perverse method), things which do need to be loaded
before things that don't.  (Of course, the amount of memory you "need" should
probably be specified by the user somehow.)

----
Larry Jones                         UUCP: uunet!sdrc!scjones
SDRC                                      scjones@sdrc
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150                  AT&T: (513) 576-2070
"Save the Quayles" - Mark Russell

jal@valhalla.ee.rochester.edu (09/01/88)

David Dyck (dcd@tc.fluke.com) writes:


>Any Extended Memory 'experts' out there?
Expert, no but I use it quite a bit.

>Is there a accepted standard method for using and sharing extended memory?
Microsoft, Lotus, Intel and AST have published a standard called XMS 2.0
(eXtended Memory Specification) which manages extended memory (as well as 
other un-managed memory areas).  The only implementation I know of is
part of Windows 286 and is called HIMEM.SYS.  A summary of the 
Interrupts will probably be included in the forthcoming Interrupt list and
is certainly available direct from Microsoft (that's how I got mine).


>Is there any way to tell if another application/ram disk/etc
>is using part of the extended memory?
The programs that I write that use extended memory make themselves
look like VDISK and also allow the user to specify the starting
address.  I will be adding XMS support so things work better.  BTW
lately (DOS 4.0) VDISK started allocating memory from the highest
address and reporting via INT 15h a smaller amount of available memory.
Other programs do this also.  It is a good technique if there is not
a need to remove your use of the memory so other programs can have it.
XMS allows relocation and reallocation of extended memory and thus
is more flexible, but only works if everyone adheres to the spec and
if a driver is available.

>I also want to have a driver utilize some of the unused extended memory.
>If my driver is loaded before VDISK, how would I/it inform VDISK 
>that some of the extended memory was already in use?
You can make yourself look like VDISK.  VDISK knows that there may be
multiple VDISK's loaded and so you can make your use of VDISK look
like a previously loaded VDISK.  It is not fun, but I've done it and
it works.

>And what if VDISK loaded first,
>is there a way for my driver to determine how much memory VDISK was using?
Yes, you can look for a VDISK just like VDISK does and setup to use the 
next available portion.

>Should all extended memory applications/drivers allow the
>user to specify the upper/lower bounds in extended memory?
I think this is a good idea until XMS becomes sufficiently available
that it is no longer needed.  In the meantime I intend to support 
both XMS and VDISK detection/faking and user specification of 
starting address/length.


>Thanks for any information,
Your welocme.  If you need detailed info, I can investigate releasing
some of my code.

stevewa@upvax.UUCP (Steve Ward) (09/03/88)

In article <368@sdrc.UUCP> scjones@sdrc.UUCP (Larry Jones) writes:
>
>No.  The cleverest idea I have heard to date is to take the amount of memory
>you need from the END of the extended memory and establish your own INT 15
>handler...
>
>Larry Jones                         UUCP: uunet!sdrc!scjones
>SDRC                                      scjones@sdrc
>2000 Eastman Dr.                    BIX:  ltl
>Milford, OH  45150                  AT&T: (513) 576-2070

The newest version of MS-Windows (Version 2.1) Includes an "Extended Memory
Manager" which windows uses to store some of its buffers (?) in Extended
memory.  I must admit total ignorance to how it works, but it may be an
indication of the "accepted way" of dealing with Extended memory, at least
according to Microsoft.  Maybe one of the guys up at MS will clue us all in...

| Steve Ward Jr.                                   |                          |
| University of Portland (Just a lowly student!)   |    stevewa@upvax.UUCP    |
| Portland, Oregon                                 | !tektronix!upvax!stevewa |