Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: [Linux] Shared memory and pointers

Thread Tools

Re: [Linux] Shared memory and pointers

Posts: n/a
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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [Linux] Shared memory and pointers Juha Nieminen C++ 0 05-15-2012 09:38 AM
Re: [Linux] Shared memory and pointers BGB C++ 0 05-14-2012 04:16 PM
Re: [Linux] Shared memory and pointers Victor Bazarov C++ 0 05-14-2012 03:30 PM
pointers, pointers, pointers... cerr C Programming 12 04-07-2011 11:17 PM
Shared Public Variables and Shared Methods Joe Fallon ASP .Net 3 07-16-2004 07:11 AM