Results 1 to 2 of 2
Are there features that the kernel provides for user processes to start sharing their memories during runtime that can avoid a kernel copy for transfer of the said shared memory?
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-08-2012 #1Just Joined!
- Join Date
- Mar 2012
- Posts
- 1
Shared memory
Are there features that the kernel provides for user processes to start sharing their memories during runtime that can avoid a kernel copy for transfer of the said shared memory?
Ex:
p1
{
buf buf1;
if(some_conditon)
{
handle=share(buf);
}
}
p2
{
buf buf2;
buf2=shared(handle);
}
- 08-28-2012 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,232
Read the man page shm_overview to get an overview of memory sharing in Linux. Basically, it maps the shared memory segment into the process virtual memory space. Once that is done, as far as I know writing to that memory is direct and doesn't require kernel access.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
