Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] Mapped file destructor
From: Thomas d'Erceville (gaston.azerty_at_[hidden])
Date: 2009-07-30 04:06:39


Thanks a lot for your answer.

I figured out this RAII pattern behavior a short time after I wrote this
message. Actually I though I have to explicitly "unmap" these addresses.

Best,

Thomas

2009/7/30 Ion Gaztañaga <igaztanaga_at_[hidden]>

> Thomas d'Erceville escribió:
>
>>
>> Hello,
>>
>> In my code I open a mapped file (previously created) and I construct an
>> object inside, this object is valid and I can use it. But after the
>> mapped_file has been destroyed my object is not valid anymore. It happens
>> just after the call to the destructor of the mapped file.
>>
>> How can I tell to the Mapped File to do not flush its content when it is
>> destructed?
>>
>
> Sorry the long delay, I've been on holidays.
>
> I don't understand your question: when the mapped file is destroyed, the
> address range is unmapped from the process, so you will get a segmentation
> fault if you try to access the address of your object. That's how memory
> mapping works, once you unmap it, that address is garbage.
>
> Best,
>
> Ion
>
>
>> Best regards.
>>
>> Thomas
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net