Refactor shared memory storage to allow for multiple named datasets
This commit is contained in:
committed by
Patrick Niklaus
parent
bc120776f0
commit
666ce46d36
@@ -13,12 +13,12 @@ namespace engine
|
||||
namespace datafacade
|
||||
{
|
||||
|
||||
SharedMemoryAllocator::SharedMemoryAllocator(storage::SharedDataType data_region)
|
||||
SharedMemoryAllocator::SharedMemoryAllocator(storage::SharedRegionRegister::ShmKey data_shm_key)
|
||||
{
|
||||
util::Log(logDEBUG) << "Loading new data for region " << regionToString(data_region);
|
||||
util::Log(logDEBUG) << "Loading new data for region " << data_shm_key;
|
||||
|
||||
BOOST_ASSERT(storage::SharedMemory::RegionExists(data_region));
|
||||
m_large_memory = storage::makeSharedMemory(data_region);
|
||||
BOOST_ASSERT(storage::SharedMemory::RegionExists(data_shm_key));
|
||||
m_large_memory = storage::makeSharedMemory(data_shm_key);
|
||||
|
||||
storage::io::BufferReader reader(reinterpret_cast<char *>(m_large_memory->Ptr()),
|
||||
m_large_memory->Size());
|
||||
|
||||
Reference in New Issue
Block a user