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

Re: [MiNT] Mxalloc() and memory protection

Gerhard Stoll wrote:

PD> (Atari Compendium, TOS.HYP), you'll read that the "bit 3" has a
PD> special meaning

After I look to some old news I things that this is wrong. What I found is that
for MiNT the bit 3 is defined, but not used (sys/dosmem.c):
# if 0
	/* I'm very suspicious of the 0x08 flag; I can't see how it could
	 * work as the comment below seems to indicate -- ERS

	/* if the mode argument has the 0x08 bit set then you're trying
	 * to change the protection mode of a block you already own.
	 * "size" is really its base address. (new as of 2/6/1992)
	if (mode & 0x08) change_prot_status(curproc,size,protmode);
# endif

I will changed the tos.hyp that bit is reserved.

Compendium is wrong, here official documentation from Atari comming with Falcon system dev for bit 3:

When set, means "change the protection mode of a region to the protection-mode field". You may only do this if you own region; In this case the first argument to Mxalloc is the starting address of the region, as returned from an earlier Mxalloc or Malloc or Pexec (mode 3 and 5) call