Advertisement
redsees

Untitled

Apr 25th, 2014
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<sys/mman.h>
  3. #include<sys/types.h>
  4. #include<fcntl.h>
  5. int rofl=5;
  6. int main(){
  7.     int my_shm=shm_open("LOLME",O_CREAT|O_RDWR,666);
  8.     int *y;
  9.     y=(int*)mmap(NULL,sizeof(rofl),PROT_READ|PROT_WRITE,MAP_SHARED,my_shm,0);
  10.     printf("ROFL Location contains : %d\n\n",*y);
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement