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.