From: "H.W. Stockman" Newsgroups: comp.os.msdos.djgpp Subject: Re: What does locking memory do? Date: Sat, 18 Oct 1997 19:25:16 -0600 Organization: Lentil Sorbet, Inc. Lines: 16 Message-ID: <3449617C.7C08@swcp.com> References: <01bcdc22$9423bc60$b95d29c0 AT worldwii> Reply-To: hwstock AT swcp DOT com NNTP-Posting-Host: pm2-24.swcp.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Dave wrote: > > What is the purpose of locking memory? I am new to 32 bit programming, and > I saw the locking functions and have heard of them being used, and I am > curious. I haven't used locking functions in a while, but typically they were used for (e.g.) the mouse interface in extended DOS graphics applications, when the app was running under virtual memory. There are certain DOS services that can't be swapped to disk, or relocated in memory, if you want reliable behavior (for that manner, non-termination). An example would be: an extended DOS app run under Windows; without locking the memory associated with the cursor bitmap and the function itself, merely moving the graphics cursor could trash the program.