www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/02/08:03:05

Message-ID: <19991002115023.6605.rocketmail@web1404.mail.yahoo.com>
Date: Sat, 2 Oct 1999 04:50:23 -0700 (PDT)
From: Prashant TR <prashant_news AT yahoo DOT com>
Subject: Re: Locking Memory
To: djgpp AT delorie DOT com
Cc: alexmdc AT virtualis DOT com
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com


--- Alex Mendes da Costa <alexmdc AT virtualis DOT com>
wrote:
> "Lock all the memory your handler touches and the
> code of the handler
> itself and any function it calls with a series of
> calls to
> __dpmi_lock_linear_region".

Locking is to prevent your code or data from being
paged. If your program starts paging when you're
inside an interrupt handler, especially this one with
IRQ1 (the 2nd highest proority), your program would
lock up.
This is because your hard disk will use IRQ14/15 which
has a lower prority. This means that you can't access
your hard disk, which of course means that your
program crashes.

You can get the linear address you want to lock by
adding __djgpp_base_address and the offset of the
function you want to lock.

If you wanted to lock the assembly function "foo()", I
would use the code

_go32_dpmi_lock_code(foo, 1234);

where 1234 is the size of my interrupt handler.
See the help in RHIDE.

Use the above function rather than direct dealing with
DPMI. Its much easier.

---
Prashant TR
http://www.members.tripod.com/prashant_tr/


=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

- Raw text -


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