agnarayana
Technical User
It seems unbelievable that converting internal memory to shared memory is not allowed...
I always felt this is a good way of managing data transfers and flexibility of memory management
For example, We can do
buf = mmap(1 GB, /dev/zero) ; //map some address
munmap(buf, 512 MB) ; // remove unwanted memory
There is flexibility in adjusting the size of memory. Finally when we are done and want to transfer the data to another process.
we do something like shmat(shmid, buf, 0x666) ;
The following assumptions are made. There is a writer process and reader process. Writer process writes data. After the entire data is completely written. Reader process reads the data. So no problems of simultaneous and wrong address access.
Thanks in Advance,
Regards,
narayan