X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rod Pemberton Newsgroups: comp.os.msdos.djgpp Subject: Re: how to unlock locked memory Date: Wed, 16 Mar 2016 00:03:17 -0400 Organization: Aioe.org NNTP Server Lines: 29 Message-ID: <20160316000317.329b9cf8@_> References: NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: abuse AT aioe DOT org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Claws Mail 3.13.1 (GTK+ 2.24.13; x86_64-unknown-linux-gnu) Bytes: 1691 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 10 Mar 2016 17:38:52 +0100 "Wiktor S." wrote: > Is there a proper way to unlock memory locked with > _go32_dpmi_lock_code and _go32_dpmi_lock_data? > > Are you still here? I'm surprised no one has responded to this yet ... _go32_dpmi_lock_code() and _go32_dpmi_lock_dat() are both defined in src/libc/go32/gopint.c . _go32_dpmi_lock_code() and _go32_dpmi_lock_data() both call __dpmi_lock_linear_region() to lock code and data. Both routines call __dpmi_get_segment_base_address() with either _go32_my_cs() or _go32_my_ds(), respectively, to compute the region's address and size to be locked. So, you should be able to use __dpmi_unlock_linear_region() by passing the same address and size as they were computed in either _go32_dpmi_lock_code() or _go32_dpmi_lock_data(). Look at the code in gopint.c to see how this is done. Rod Pemberton