Reputation: 707
I am trying to setup a 'shared' memory location using
caddr_t mmap_ptr;
But am getting an error. Any help? Thanks!
Also
mmap_ptr = mmap((caddr_t) 0, /* Memory Location, 0 lets O/S choose */
MAX_BUFFER_SIZE,/* How many bytes to mmap */
PROT_READ | PROT_WRITE, /* Read and write permissions */
MAP_SHARED, /* Accessible by another process */
fid, /* which file is associated with mmap */
(off_t) 0); /* Offset in page frame */
Upvotes: 3
Views: 5237