From: Vic Newsgroups: comp.os.msdos.djgpp Subject: Re: What does locking memory do? Date: Sat, 18 Oct 1997 21:09:14 -0400 Organization: Communications Accessibles Montreal, Quebec Canada Lines: 17 Message-ID: <34495DBA.2CCD@cam.org> References: <01bcdc22$9423bc60$b95d29c0 AT worldwii> NNTP-Posting-Host: dynppp-108.hip.cam.org 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. AFAIK The purpose of locking functions and data is this: You are using a DPMI server which gives you virtual memory. When you run out of physical memory the DPMI server starts swapping data to disk. If an interrupt occurs and the data needed by the interrupt code is swapped to disk, DOS will die. Locking keeps your data from being swapped. > Could not locking be the reason my program keeps crashing on my blit code? > It sometimes works and sometimes doesn't... Does it SIGSEGV? Cause then you are writing off the screen boundaries... -- --> http://www.cam.org/~tudor <-- Go ahead and build another Messiah We dig another grave...