From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Locking memory Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 21 X-Trace: /KiKeWee8jE/d1sKhEkTrRBTSY7Xj0o6RbInbXDe0Ep26J/LZJs5OsAcuxkDostw9YLxPPxoJTIa!55CKyV8n313USJMDH31s2yEQhefPFyaiRYcwEtNpKzoekW6pxgh/Yagh0SKCDw1/cdD1L/mkHQFs!lu2T X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sun, 15 Oct 2000 00:50:19 GMT Distribution: world Date: Sun, 15 Oct 2000 00:50:19 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sat, 14 Oct 2000 14:14:17 +0100, "J" wrote: > I know you are supposed to lock all code and data that is used in >a interrupt handler etc.. because of virtual memory swapping data or >something along that line. Can somebody clearly explain to me how this >all works? Is there any other situation that's non-interrupt releated >in which you would want to lock memory also? What I don't understand is >why I lock memory in interrupt handlers and not anywhere else. Thanx. Locking memory makes sure it doesn't get swapped out to disk. Use it to make sure data structures you use often stay in RAM. Interrupt thread code needs data to be locked because a swap operation during another DOS call will crash non-reentrant DOS. --