Unix Programming - mmap in a thread?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2007 > mmap in a thread?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author mmap in a thread?
sgsnewsgrp@gmail.com

2007-07-27, 7:21 pm


Does anyone know if mmap is thread safe? I didn't catch any thread
references in the man page.

I'm using mmap on a local file which is read into memory for searching
- no updates

Thanks

Scott Lurndal

2007-07-28, 1:24 am

sgsnewsgrp@gmail.com writes:
>
>Does anyone know if mmap is thread safe? I didn't catch any thread
>references in the man page.
>
>I'm using mmap on a local file which is read into memory for searching
>- no updates
>
>Thanks
>


Yes, it is safe. Do be aware that it is up to the application to arbitrate
access to the mapped pages.

scott
sgsnewsgrp@gmail.com

2007-07-30, 7:19 pm

> Yes, it is safe. Do be aware that it is up to the application to arbitrate
> access to the mapped pages.


Each mapped file is accessed at most by a single thread so I should
not have any issues

Thanks

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com