On 2010-06-03 15:45:11 +0200, Andrei Alexandrescu <seewebsiteforem...@erdani.org> said:

Once created, a file mapping is at a constant address.

Hi, sorry but don't get this. This is true for one session. But the next time you run the prog the mapping can be on an other address.

If you remap a file (an unsafe operation),

What do you mean by "remaping a file"?

 you can memcpy the data around. All D objects are assumed to be relocatable.

Still don't get it.

If a MMF is mapped into VM at 0x1000 and you create objects and pointers, the pointers within the MMF need to get 0x1000 substracted. Only in this case the pointer within the MMF references an address = the index within the file.

--
Robert M. Münch
http://www.robertmuench.de

Reply via email to