34 #ifndef SOMAIO_ALLOCATOR_MAPPINGRW_H 35 #define SOMAIO_ALLOCATOR_MAPPINGRW_H 57 virtual void deallocate(
char* ptr,
size_t n,
size_t sz )
const;
63 friend std::ostream&
operator << ( std::ostream& os,
67 typedef std::pair<std::string, offset_t> _FileId;
73 mutable std::map<char*, _FileId> _mapPtr2Name;
74 mutable std::map<std::string, std::map<offset_t, char*> >
82 mutable std::map<char*, WinHandles> _mapDesc;
84 mutable std::map<char*, int> _mapDesc;
86 mutable std::map<char*, int> _mapRef;
virtual char * allocate(size_t n, size_t sz, DataSource *ds) const
virtual void deallocate(char *ptr, size_t n, size_t sz) const
bool canDuplicate() const
Abstraction layer for various data sources (file, buffer, socket...).
virtual ~MappingRWAllocator()
friend std::ostream & operator<<(std::ostream &os, const MappingRWAllocator &thing)
Abstract base class for actual allocators types.
static const MappingRWAllocator & singleton()