Find the answer to your Linux question:
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.
  1. #1
    Just 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);
    }

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,452
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •