Re: [Linux] Shared memory and pointers

Discussion in 'C++' started by Nobody, May 16, 2012.

  1. Nobody

    Nobody Guest

    On Tue, 15 May 2012 11:18:54 +0200, Willy wrote:

    > Thanks and sorry for OT.
    >
    > I think I will use indexes instead pointers.
    > The biggest problem is that my code is already written (I'm doing a
    > DOS->Linux porting) so I've a lot of code to modify and test :-(


    If the code is C++, you can make a class which contains an index but which
    behaves like a pointer by implementing operator* and operator->.

    You can force mapping at a specific address by passing the MAP_FIXED flag
    to mmap(), but that will fail if any part of the address space is already
    in use.
    Nobody, May 16, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zorro
    Replies:
    3
    Views:
    536
    Venu Yanamandra
    Nov 25, 2010
  2. cerr

    pointers, pointers, pointers...

    cerr, Apr 7, 2011, in forum: C Programming
    Replies:
    12
    Views:
    654
  3. Victor Bazarov

    Re: [Linux] Shared memory and pointers

    Victor Bazarov, May 14, 2012, in forum: C++
    Replies:
    0
    Views:
    442
    Victor Bazarov
    May 14, 2012
  4. BGB
    Replies:
    0
    Views:
    463
  5. Juha Nieminen
    Replies:
    0
    Views:
    413
    Juha Nieminen
    May 15, 2012
Loading...

Share This Page