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

Re: [MiNT] Correct way to detect memory protection



Hi!

On Mon, Sep 15, 2003 at 11:33:10PM -0400, Lonny Pursell wrote:
> [...] If Sysconf(-1) returns anything != -32L, you can safely
> use memory protection flags in calls to Mxalloc(). [...]
> 
> 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?

Well, of course MagiC dose not support memory protection. But if
you read the mail you quoted carefully, you should find the answer
yourself: There's a difference between being able to pass memory
protection flags to Mxalloc() and memory protection being active
...

The problem the old mail was referring to is that some versions of
TOS (3.something) support Mxalloc(), but behave strangely (up to
and including crashes) when you use memory protection flags. _No_
statement was made about the actual availabilty or activity of
memory protection.


Ciao

Thomas


-- 
Thomas Binder (Gryf @ IRCNet)
gryf@hrzpub.tu-darmstadt.de
PGP-key available on request!