Ticket #10859: fix_typo.patch

File fix_typo.patch, 11.6 KB (added by anonymous, 8 years ago)
  • interprocess/doc/interprocess.qbk

    a b  
    310310
    311311Named resources offered by [*Boost.Interprocess] must cope with platform-dependant
    312312permission issues also present when creating files. If a programmer wants to
    313 shared shared memory, memory mapped files or named synchronization mechanisms
     313shared memory, memory mapped files or named synchronization mechanisms
    314314(mutexes, semaphores, etc...) between users, it's necessary to specify
    315315those permissions. Sadly, traditional UNIX and Windows permissions are very
    316316different and [*Boost.Interprocess] does not try to standardize permissions,
     
    320320[classref boost::interprocess::permissions permissions object] that can be
    321321configured with platform-dependant permissions.
    322322
    323 Since each mechanism can be emulated through diferent mechanisms
     323Since each mechanism can be emulated through different mechanisms
    324324(a semaphore might be implement using mapped files or native semaphores)
    325325permissions types could vary when the implementation of a named resource
    326 changes (eg.: in Windows mutexes require `synchronize permissions`, but
     326changes (e.g.: in Windows mutexes require `synchronize permissions`, but
    327327that's not the case of files).
    328328To avoid this, [*Boost.Interprocess] relies on file-like permissions,
    329329requiring file read-write-delete permissions to open named synchronization mechanisms
    330 (mutex, semaphores, etc.) and appropiate read or read-write-delete permissions for
     330(mutex, semaphores, etc.) and appropriate read or read-write-delete permissions for
    331331shared memory. This approach has two advantages: it's similar to the UNIX philosophy
    332332and the programmer does not need to know how the named resource is implemented.
    333333
     
    642642a client process opens the shared memory, maps it, and checks
    643643that the data is correctly initialized. Take in care that [*if the server exits before
    644644the client connects to the shared memory the client connection will fail], because
    645 the shared memory segment is destroyed when no proces is attached to the memory.
     645the shared memory segment is destroyed when no process is attached to the memory.
    646646
    647647This is the server process:
    648648
     
    656656
    657657[section:xsi_shared_memory XSI shared memory]
    658658
    659 In many UNIX systems, the OS offers another shared memory memory mechanism, XSI
     659In many UNIX systems, the OS offers another shared memory mechanism, XSI
    660660(X/Open System Interfaces) shared memory segments, also known as "System V" shared memory.
    661661This shared memory mechanism is quite popular and portable, and it's not based in file-mapping
    662662semantics, but it uses special functions (`shmget`, `shmat`, `shmdt`, `shmctl`...).
     
    809809
    810810If several processes map the same file, and a process modifies a memory range
    811811from a mapped region that is also mapped by other process, the changes are
    812 inmedially visible to other processes. However, the file contents on disk are
     812immediately visible to other processes. However, the file contents on disk are
    813813not updated immediately, since that would hurt performance (writing to disk
    814814is several times slower than writing to memory). If the user wants to make sure
    815815that file's contents have been updated, it can flush a range from the view to disk.
    816 When the function returns, the flushing process has startd but there is not guarantee that
     816When the function returns, the flushing process has started but there is not guarantee that
    817817all data has been written to disk:
    818818
    819819[c++]
     
    11901190and `offset_ptr` is different for every process.
    11911191
    11921192Some implementations choose the offset 0 (that is, an `offset_ptr`
    1193 pointing to itself) as the null pointer pointer representation
     1193pointing to itself) as the null pointer representation
    11941194but this is not valid for many use cases
    11951195since many times structures like linked lists or nodes from STL containers
    11961196point to themselves (the
     
    18121812
    18131813[table Transition Possibilities for an Upgradable Mutex
    18141814   [[If a thread has acquired the...] [It can atomically release the previous lock and...]]
    1815    [[Sharable lock]    [try to obtain (not guaranteed) immediately the Exclusive lock if no other thread has exclusive or upgrable lock]]
    1816    [[Sharable lock]    [try to obtain (not guaranteed) immediately the Upgradable lock if no other thread has exclusive or upgrable lock]]
     1815   [[Sharable lock]    [try to obtain (not guaranteed) immediately the Exclusive lock if no other thread has exclusive or upgradable lock]]
     1816   [[Sharable lock]    [try to obtain (not guaranteed) immediately the Upgradable lock if no other thread has exclusive or upgradable lock]]
    18171817   [[Upgradable lock]  [obtain the Exclusive lock when all sharable locks are released]]
    18181818   [[Upgradable lock]  [obtain the Sharable lock immediately]]
    18191819   [[Exclusive lock]   [obtain the Upgradable lock immediately]]
     
    27402740   file_lock f_lock("my_file");
    27412741
    27422742   {
    2743       //Construct a sharable lock with the filel lock.
     2743      //Construct a sharable lock with the file lock.
    27442744      //This will call "f_lock.sharable_lock()".
    27452745      sharable_lock<file_lock> sh_lock(f_lock);
    27462746
     
    27642764   file_lock f_lock("my_file");
    27652765
    27662766   {
    2767       //Construct a sharable lock with the filel lock.
     2767      //Construct a sharable lock with the file lock.
    27682768      //This will call "f_lock.lock()".
    27692769      scoped_lock<file_lock> e_lock(f_lock);
    27702770
     
    29882988As we have seen, [*Boost.Interprocess] offers some basic classes to create shared memory
    29892989objects and file mappings and map those mappable classes to the process' address space.
    29902990
    2991 However, managing those memory segments is not not easy for non-trivial tasks.
     2991However, managing those memory segments is not easy for non-trivial tasks.
    29922992A mapped region is a fixed-length memory buffer and creating and destroying objects
    29932993of any type dynamically, requires a lot of work, since it would require programming
    29942994a memory management algorithm to allocate portions of that segment.
     
    32193219process still has the shared memory object mapped.
    32203220
    32213221The user can also map the managed shared memory in a fixed address. This option is
    3222 essential when using using `fixed_managed_shared_memory`. To do this, just
     3222essential when using `fixed_managed_shared_memory`. To do this, just
    32233223add the mapping address as an extra parameter:
    32243224
    32253225[c++]
     
    33793379
    33803380To obtain a more portable behaviour, use `file_mapping::remove(const char *)` operation, which
    33813381will remove the file even if it's being mapped. However, removal will fail in some OS systems if
    3382 the file (eg. by C++ file streams) and no delete share permission was granted to the file. But in
     3382the file (e.g. by C++ file streams) and no delete share permission was granted to the file. But in
    33833383most common cases `file_mapping::remove` is portable enough.
    33843384
    33853385[endsect]
     
    39153915There are 2 types of `allocate_many` functions:
    39163916
    39173917* Allocation of N buffers of memory with the same size.
    3918 * Allocation ot N buffers of memory, each one of different size.
     3918* Allocation of N buffers of memory, each one of different size.
    39193919
    39203920[c++]
    39213921
     
    45404540[classref boost::interprocess::cached_node_allocator cached_node_allocator].
    45414541
    45424542To know the details of the implementation of
    4543 of the segregated storage pools see the
     4543the segregated storage pools see the
    45444544[link interprocess.architecture.allocators_containers.implementation_segregated_storage_pools Implementation of [*Boost.Interprocess] segregated storage pools]
    45454545section.
    45464546
     
    47724772and performance (acceptable for many applications) with the ability to return free chunks
    47734773of nodes to the memory segment, so that they can be used by any other container or managed
    47744774object construction. To know the details of the implementation of
    4775 of "adaptive pools" see the
     4775"adaptive pools" see the
    47764776[link interprocess.architecture.allocators_containers.implementation_adaptive_pools Implementation of [*Boost.Intrusive] adaptive pools]
    47774777section.
    47784778
     
    49724972
    49734973[*Boost.Interprocess] STL compatible allocators offer a STL compatible allocator
    49744974interface and if they define their internal *pointer* typedef as a relative pointer,
    4975 they can sbe used to place STL containers in shared memory, memory mapped files or
     4975they can be used to place STL containers in shared memory, memory mapped files or
    49764976in a user defined memory segment.
    49774977
    49784978However, as Scott Meyers mentions in his Effective STL
     
    52165216
    52175217[endsect]
    52185218
    5219 Programmers can place [*Boost.CircularBuffer] containers in sharecd memory provided
     5219Programmers can place [*Boost.CircularBuffer] containers in shared memory provided
    52205220they disable debugging facilities with defines `BOOST_CB_DISABLE_DEBUG` or the more
    52215221general `NDEBUG`. The reason is that those debugging facilities are only compatible
    52225222with raw pointers.
     
    61896189   and meta-data for destruction (number of objects, etc...).
    61906190
    61916191*  Call the constructors of the object being created. If it's an array, one
    6192    construtor per array element.
     6192   constructor per array element.
    61936193
    61946194*  Unlock the recursive mutex.
    61956195
     
    63496349
    63506350*  [*my_algorithm]'s constructor must take 2 arguments:
    63516351   *  [*size] indicates the total size of the managed memory segment, and
    6352       [*my_algorithm] object will be always constructed a at offset 0
     6352      [*my_algorithm] object will be always constructed at offset 0
    63536353      of the memory segment.
    63546354
    63556355   *  The [*extra_hdr_bytes] parameter indicates the number of bytes after
     
    65826582* [*boost::map_index] uses *boost::interprocess::map* as index type.
    65836583
    65846584* [*boost::null_index] that uses an dummy index type if the user just needs
    6585   anonymous allocations and wants to save some space and class instantations.
     6585  anonymous allocations and wants to save some space and class instantiations.
    65866586
    65876587Defining a new managed memory segment that uses the new index is easy. For
    65886588example, a new managed shared memory that uses the new index:
     
    66456645found, this might be due to some buggy software that floods or erases the event log.
    66466646
    66476647In any error case (shared documents folder is not defined or bootup time could not be obtained, the library throws an error. You still
    6648 can use [*Boost.Interprocess] definining your own directory as the shared directory. Just define `BOOST_INTERPROCESS_SHARED_DIR_PATH`
     6648can use [*Boost.Interprocess] defining your own directory as the shared directory. Just define `BOOST_INTERPROCESS_SHARED_DIR_PATH`
    66496649when using the library and that path will be used to place shared memory files.
    66506650
    66516651[endsect]
     
    66676667On systems without POSIX shared memory support shared memory objects are implemented as memory mapped files, using a directory
    66686668placed in "/tmp" that can include (if `BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME` is defined) the last bootup time (if the Os supports it).
    66696669As in Windows, in any error case obtaining this directory the library throws an error . You still can use
    6670 [*Boost.Interprocess] definining your own directory as the shared directory. Just define `BOOST_INTERPROCESS_SHARED_DIR_PATH`
     6670[*Boost.Interprocess] defining your own directory as the shared directory. Just define `BOOST_INTERPROCESS_SHARED_DIR_PATH`
    66716671when using the library and that path will be used to place shared memory files.
    66726672
    66736673[endsect]
     
    70407040
    70417041[section:release_notes_boost_1_38_00 Boost 1.38 Release]
    70427042
    7043 *  Updated documentation to show rvalue-references funcions instead of emulation functions.
     7043*  Updated documentation to show rvalue-references functions instead of emulation functions.
    70447044*  More non-copyable classes are now movable.
    70457045*  Move-constructor and assignments now leave moved object in default-constructed state
    70467046   instead of just swapping contents.