Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] create a managed_mapped_file without allocator mutex?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-03-18 11:54:51


El 14/03/2010 19:33, Andy Wiese escribió:
> Is it possible to create a:
> typedef basic_managed_mapped_file< char,rbtree_best_fit< mutex_family
> >,iset_index > managed_mapped_file;
> That uses some kind of no-op mutex family? Can anyone give me a hint how
> to declare such a thing?
> Thanks much for any advice,
> Andy

You can customize locking in the AllocationAlgorithm because
rbtree_best_fit is

template<class MutexFamily, class VoidPointer, std::size_t MemAlignment>
class rbtree_best_fit;

use null_mutex_family declared in mutex_family.hpp

typedef basic_managed_mapped_file
< char,rbtree_best_fit< null_mutex_family>,iset_index >
my_managed_mapped_file;

Best,

Ion


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