Mail Archives: djgpp/2002/06/16/02:30:56

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Weird locking bug
Date: Sat, 15 Jun 2002 23:42:28
Organization: Aspen Technology, Inc.
Lines: 9
Message-ID: <>
References: <3D067654 DOT 57A9B1B2 AT yahoo DOT com> <3d06d47a DOT sandmann AT clio DOT rice DOT edu> <3D077F39 DOT E6AE5D4A AT yahoo DOT com>
X-Trace: 1024202720 27223 (16 Jun 2002 04:45:20 GMT)
X-Complaints-To: postmaster AT aspentech DOT com
NNTP-Posting-Date: 16 Jun 2002 04:45:20 GMT
X-NewsEditor: ED-1.5.8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> > You didn't add the selector base address to the memory, so you are
> > trying to lock the DOS memory area (a bug in the code).
> _go32_dpmi_lock_code adds the CS base to the offset before calling 
> __dpmi_lock_linear_region.

So it does, my mistake (thinking the direct dpmi call, not go32 version).
The original code starts past the null page, but sends the entire CS
selector limit as the size, so you would lock one page too many, causing

- Raw text -

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