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;
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;
Abstraction layer for various data sources (file, buffer, socket...).
Abstract base class for actual allocators types.
static const MappingROAllocator & singleton()
virtual void deallocate(char *ptr, size_t n, size_t sz) const
friend std::ostream & operator<<(std::ostream &os, const MappingROAllocator &thing)
virtual char * allocate(size_t n, size_t sz, DataSource *ds) const
virtual ~MappingROAllocator()
std::ostream & operator<<(std::ostream &os, const MemoryAllocator &thing)