delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/15/03:41:29

Date: Mon, 15 Dec 1997 10:38:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: jyoun AT user2 DOT teleport DOT com
cc: djgpp AT delorie DOT com
Subject: Re: dos memory alignment
In-Reply-To: <671qjd$lt4$1@news1.teleport.com>
Message-ID: <Pine.SUN.3.91.971215103821.22478J-100000@is>
MIME-Version: 1.0

On 14 Dec 1997 jyoun AT user2 DOT teleport DOT com wrote:

> Does anyone know how to allocate 64k of dos memory aligned on a 
> 64k page boundary?  I have look through the dpmi functions but 
> couldn't find anything relevent.

Allocate twice as much and use the part that's 64k-aligned.  AFAIK,
there's no other way.

Note that if you need this buffer for DMA, alignment is not the only
requirement, you also need the buffer to span physically contiguous
pages.  This is much harder to achieve, but there is a (tricky) way.

- Raw text -


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