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