www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/24/11:01:50

From: egmose AT image DOT dk (Søren Egmose)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How to determine the physical address from a DPMI descriptor
Date: Mon, 24 Aug 1998 11:26:44 GMT
Message-ID: <35e24ad7.6733200@news.image.dk>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980823162729 DOT 1451D-100000 AT is> <35e04c8f DOT 1705102 AT news DOT teaser DOT fr>
MIME-Version: 1.0
Lines: 42
NNTP-Posting-Host: news010.image.dk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In artikel <35e04c8f DOT 1705102 AT news DOT teaser DOT fr>,
On Sun, 23 Aug 1998 18:10:52 GMT, jpdelprat AT teaser DOT fr (JP) wrote:

>Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
>
>>
>>On Tue, 18 Aug 1998, JP wrote:
>>
>>> My need is to create and lock a 2Mo continuous buffer (under Windows
>>> 95), and determine its physical address to give it to a video capture card.
>>
>>I think section 18.7 of the FAQ should get you started.
>>
>>> With DPMI functions (under Windows 95), I allocate my buffer then 
>>> lock it, but despite the call to dpmi_lock_linear_region, the buffer
>>> is still mixed and partially swapped out.
>>
>>Did you remember to make your segment to have a size that's a multiple of 
>>4KB?
>
>Thanks for the advice. I hadn't noticed this point. Fortunately, my
>buffer is exactly 2M. So it should be ok. 
>
>I have found another solution : I allocate and lock an xms buffer
>before Windows starts. This buffer is continuous and cannot be used by
>Windows. The drawback is that my system now has less memory. I would
>prefer to allocate my buffer when I run my program, but I could find
>any way.

Under windows you would use something like the following to get a
non-swappable array.

mem = GlobalAlloc(GMEM_FIXED, TWOMB);

isn't there anything like this in djgpp?
-- 
mvh.
Søren

Some random US email addresses: senator AT hutchison DOT senate DOT gov
sam DOT tx03 AT mail DOT house DOT gov rhundt AT fcc DOT gov jquello AT fcc DOT gov
sness AT fcc DOT gov rchong AT fcc DOT gov uce AT ftc DOT gov abuse AT localhost

- Raw text -


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