Hi, Aris,

The documentation about mmap
<http://pubs.opengroup.org/onlinepubs/007908799/xsh/mmap.html>
indicates that MAP_PRIVATE and MAP_SHARED affects the write operations
only.  I am under the impression that for read-only file maps, the
system will automatically share the content -- therefore nothing is
said about this case.

If you know for sure that MAP_SHARED is necessary for read-only maps
to be shared, let me know, I will change the flag from MAP_PRIVATE to
MAP_SHARED.

John


On 2/10/15 6:15 AM, Aris Setyawan wrote:
> I have checked the code. Yes, the mmap opened readonly, "read_only (@c
> opt = 0) mode".
> But this lead to call mmap using MAP_PRIVATE flag (not shared).
> 
> To share mmap between process, one must mmap using MAP_SHARED.
> So I think this mmap wouldn't be shared between process.
> 
> Is this expected behavior?
> 
> -Aris
> 
> On 2/9/15, K. John Wu <[email protected]> wrote:
>> Hi, Aris,
>>
>> In all cases, FastBit is doing memory map on read-only content.
>> Therefore, the system should be able to safely share the content among
>> different processes. Hope this helps.
>>
>> John
>>
>>
>> On 2/8/15 7:17 PM, Aris Setyawan wrote:
>>> Hi John,
>>>
>>> Is fastbit memory mapped file, shared between process?
>>>
>>> I plan to use fastbit from php-apache, which have multiple process
>>> architecture.
>>> If the memory mapped file shared, I can save a lot of memory.
>>>
>>>
>>> Regards,
>>> -aris.
>>> _______________________________________________
>>> FastBit-users mailing list
>>> [email protected]
>>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>>
>> _______________________________________________
>> FastBit-users mailing list
>> [email protected]
>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
> 
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to