delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/21/23:55:55

Message-ID: <F554E1189472D21198D000805F654BFE5A0029@ntxchangerend.engr.rendition.com>
From: yjtseng <yjtseng AT micron DOT com>
To: djgpp AT delorie DOT com
Cc: salvador AT inti DOT gov DOT ar, nate AT cartsys DOT com, yjtseng AT micron DOT com
Subject: What if?
Date: Wed, 21 Apr 1999 21:55:46 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Reply-To: djgpp AT delorie DOT com

If I allocate a SIZE byte of memory block using  ptr=malloc(SIZE), then get
the  linear_base_addr1 the data segment using
__dpmi_get_segment_base_address( selector, *linear_base_addr1)  where
selector=_my_ds( ). I then get physical_base_addr for the data pages that
contain the allocated SIZE byte of memory through CR3 and some other
intermediate steps. 

Question: Can I now use __dpmi_physical_address_mapping( physical_base_addr,
SIZE) to get a linear_base_addr2  for the allocated memory so that it cam be
used to  access the same physical memory? Should linear_base_addr2 be the
same as linear_base_addr1? The reason that I do this is to try to verify the
physical_base_addr of the data page is the right one. Any other way that
will  let me do this?

Thanks.


Jay




- Raw text -


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