Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting process internal memory to shared memory allowed ?

Status
Not open for further replies.

agnarayana

Technical User
Feb 4, 2003
1
JP

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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top