Mail Archives: djgpp-workers/1999/12/07/11:10:04
> On Tue, 7 Dec 1999, Martin Stromberg wrote:
>
> > > One other issue about the solution proposed by Peter: it sets the
> > > limit of the additional selector to 32h (since it only spans the
> > > real-mode registers' data structure. This makes the segment be
> > > byte-granular (as opposed to page granularity used by DJGPP for all
> > > other selectors). Can this cause any problems? Is it safer to define
> > > a page-granular segment?
> >
> > Isn't it possible to have page granularity with the limit 0x32?
>
> AFAIK, for page-granular segments, the limit is given in pages, not in
> bytes. So 0x32 is 0x32 4KB pages.
>
> Charles, am I right?
Different DPMI providers handle the "granularity" bit different. The only
way to make it work reliably across all of them is the sequence of calls
that lives in the stub (I think it's like 0x7, 0x9, 0x8) which if I remember
correctly passes the limit as the last call. Many DPMI providers will clear
the page granularity when they see the size is less than 1Mb, (and set the
limit to 32bytes) while others will set the limit to 4K since you had the big
bit set.
- Raw text -