Shared Memory
Shared Memory
key
same as before; we use getuid() to make it unique
size
number of bytes to allocate
shmflag
Creating: IPC_CREAT and permissions 0 for accessing only
is as before 2nd and 3rd arguments can be used to attach to a specific address within shmem, but it is an absolute address, requiring knowledge of the address of the shared memory segment Almost always, 2nd and 3rd arguments are 0
struct vm_area_struct { struct mm_struct * vm_mm; unsigned long vm_start; unsigned long vm_end; struct vm_area_struct *vm_next; pgprot_t vm_page_prot; unsigned long vm_flags; rb_node_t vm_rb; struct vm_area_struct *vm_next_share; struct vm_area_struct **vm_pprev_share; struct vm_operations_struct * vm_ops; unsigned long vm_pgoff; struct file * vm_file; unsigned long vm_raend; void * vm_private_data; };