www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/13/05:15:25

Xref: news2.mv.net comp.os.msdos.djgpp:7168
From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allocated Memory usage
Date: Mon, 12 Aug 1996 20:15:01 -0700
Organization: Three pounds of chaos and a pinch of salt
Lines: 29
Message-ID: <320FF335.7C60@cs.com>
References: <320FB17E DOT 21C7 AT sprynet DOT com>
NNTP-Posting-Host: ppp219.cs.com
Mime-Version: 1.0
To: jkluebs AT sprynet DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

John Luebs wrote:
> 
> When you allocate memory with __dpmi_allocate_memory( ...) How do you
> use the memory???
> 
> If I used malloc() would it allocate XMS memory??

I don't get it - is there any particular reason why you need to use
__dpmi_allocate_memory() instead of malloc()?  From your post you don't
seem to realize that under DPMI it doesn't matter where any given chunk
of allocated memory comes from unless you need it for some specific
purpose (like installing real-mode interrupt handlers or something).
All available memory (DOS, high, EMS, XMS, and virtual) is all combined
into one large pool that malloc() and related functions draw from.

If you really want to know how to use __dpmi_allocate_memory(), read
the DPMI Overview in the libc reference of the DJGPP docs for the
__dpmi_meminfo structure, which is what is created by the above
function.

-- 
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>+ W+>++ N++ o+ K? w(---) O-
M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+ tv+() b+++ DI++ D++ G e(*)>++++
h!() !r !y+()
------END GEEK CODE BLOCK------

- Raw text -


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