Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: messing with memory

by sgifford (Prior)
on May 16, 2007 at 20:13 UTC ( [id://615870]=note: print w/replies, xml ) Need Help??


in reply to messing with memory

You could try Sys::Mmap. This seems to work for me:
#!/usr/bin/perl use strict; use warnings; use Fcntl qw(:DEFAULT O_ASYNC O_DIRECT); use Sys::Mmap; sysopen(my $FH,"/dev/mem", O_RDONLY, 0666) or die "Couldn't open /dev/mem\n"; my $mem; mmap($mem,1_000_000_000,PROT_READ,MAP_SHARED,$FH) or die "Couldn't mmap\n"; print "Billionth byte of memory: ",substr($mem,999_999_999,1),"\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://615870]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-25 17:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found