Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all; I want to create a "Shared Memory" in linux, then create multiple "Shared Objects" that can access to a Table for example; And one of them can write ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    27

    How to create a shared memory and some shared objects in linux?

    Hi all;

    I want to create a "Shared Memory" in linux, then create multiple "Shared Objects" that can access to a Table for example;
    And one of them can write something into the Table and the other can access and read it, so that these operations can be handled by programmer!

    I'm using Ubuntu 9.04 and I've set it's runlevel at 3 (I have commandline environment now!)
    I've searched the Internet so much, but couldn't find a good sample code for this!
    I have no experience about it and need your help to introduce me a sample code about it and advise me how to compile and use it with "GCC"?!


    Please help me with this, I'm so hurry!!

    TIA

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Is this a class exercise? Also, you don't need runlevel 3 to do this. You can start a command line terminal in the GUI desktop easily enough.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    150
    Yeah, we're all so hurry.
    Your request is about something called Interprocess Communication (IPC). A very nice summary of IPC, with example code, is available at Beej's Guide to IPC.
    --- rod.
    Stuff happens. Then stays happened.

  4. #4
    Just Joined!
    Join Date
    Jun 2010
    Posts
    15
    you aslo can do it via a virtual char device read/write .

Posting Permissions

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