See MREMAP_FIXED. There is an address argument, not mentioned in the
manpage (man-pages 1.30).
> > Hmm. This doesn't sound right. And this sounds like a silly way to
> > use reverse mappings anyway, since you can do it up front in mmap and
> > their kin. Which means you don't have to slow any of the page fault
> > logic up.
>
> Then how do you handle something like:
>
> fd = open(TESTFILE, O_RDWR | O_CREAT, 664);
> res = write(fd, one, 4096);
> mmap(addr , PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
> mmap(addr + PAGE_SIZE, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
>
> If both mappings are immediately created accessible you'll directly endup
> with aliases. There is no choice, if the pagesize is only 4kb an R4x00
> will create aliases in the case. Bad.
Indeed, a particularly nice way to handle circular buffers for DSP
algorithms provided it works :-)
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/