Subject: Re: Add a MAP_ALIGNED flag for mmap(2).
To: Matt Thomas <>
From: Andrew Brown <>
List: tech-kern
Date: 03/02/2003 23:22:47
>+		if (flags & MAP_FIXED) {
>+			if ((*addr & (align-1)) != 0)
>+				return(EINVAL);
>+			align = 0;

at some point today, something clicked in my head that said "this
should not be arbitrarily disallowed.

right now, if you specify MAP_FIXED, all you have to do is make sure
that specify a hint that's page aligned.  in the case of MAP_ALIGN,
all you should have to do it make sure specify a hint that's aligned
to the alignment you want.

0x60010000 should be fine as an aligned, fixed address, as long as
don't specify an alignment that's greater than 64k.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."