[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Correct way to detect memory protection



If this ended up on the list twice am so very sorry.  I changed
my ISP and had some mail setup problems.

I had this old message in my  archives:

---------------------------------------------------------------
  From   : Thomas Binder <gryf@hrzpub.tu-darmstadt.de>
  To     : MiNT mailing-list <mint@fishpool.com>
  Subject: Re: [MiNT] Correct way to detect MiNT kernal?

Hi!

On Thu, Dec 30, 1999 at 12:06:51PM -0500, Lonny Pursell wrote:
> Anyway it is related to memory protection.  Back when I was told
> my program did not function correctly I recoded it to correct this.
> However, as it turns out the extra bits in the mxalloc() calls
> caused serious problems on TOS 4.04 without the mint kernal present.
> Ozk knows this to be true as well.  ;-)

In a German (a non-exported MausNet) discussion group we talked abou
that problem some time ago and came to the solution Frank already told
you: If Sysconf(-1) returns anything != -32L, you can safely use memory
protection flags in calls to Mxalloc(). Of course, that means that
MagiC, should it ever implement PMMU-based memory protection, must also
implement that call, then. Andreas Kromke already knows that and agreed
(maybe because he hasn't got such plans, anyway).

Thus, Sysconf() shouldn't be used to detect the presence of MiNT, but to
decide whether to use memory protection flags with Mxalloc().
======================================================================

My question is:
I just did a test on magicmacX and sysconf(-1) returned a "2".
So has magic started to support proper memory protection or have I made
a mistake in my test?  Or is this info refering to the Atari only version
of magic?

-- 
Lonny Pursell    http://www.bright.net/~gfabasic/


------ End of Forwarded Message