Almost identical to mmap, but Linux specific
Last argument is specified as multiples of system page size instead of bytes
my $addr = syscall(&SYS_mmap2, 0, $size, &PROT_READ, &MAP_SHARED, fileno F, 0); die "$!\n" unless ($addr > 0); print "It worked!\n";
Initially it seems to work!
[mct@ellesmere ~]$ strace -o out ./mmap.pl It worked!
continued...