mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Shmem region: support huge pages via path to hugetlbfs mount
This commit is contained in:
committed by
Dennis Klein
parent
a8c76accdc
commit
0e35f1cb22
@@ -22,6 +22,7 @@
|
||||
#include <fairmq/shmem/Common.h>
|
||||
|
||||
#include <boost/interprocess/managed_shared_memory.hpp>
|
||||
#include <boost/interprocess/file_mapping.hpp>
|
||||
#include <boost/interprocess/ipc/message_queue.hpp>
|
||||
|
||||
#include <thread>
|
||||
@@ -40,13 +41,15 @@ class Manager;
|
||||
|
||||
struct Region
|
||||
{
|
||||
Region(Manager& manager, uint64_t id, uint64_t size, bool remote, FairMQRegionCallback callback = nullptr);
|
||||
Region(Manager& manager, uint64_t id, uint64_t size, bool remote, FairMQRegionCallback callback = nullptr, const std::string& path = "", int flags = 0);
|
||||
|
||||
Region() = delete;
|
||||
|
||||
Region(const Region&) = default;
|
||||
Region(Region&&) = default;
|
||||
|
||||
void InitializeQueues();
|
||||
|
||||
void StartReceivingAcks();
|
||||
void ReceiveAcks();
|
||||
|
||||
@@ -61,6 +64,8 @@ struct Region
|
||||
std::string fName;
|
||||
std::string fQueueName;
|
||||
boost::interprocess::shared_memory_object fShmemObject;
|
||||
FILE* fFile;
|
||||
boost::interprocess::file_mapping fFileMapping;
|
||||
boost::interprocess::mapped_region fRegion;
|
||||
|
||||
std::mutex fBlockLock;
|
||||
|
Reference in New Issue
Block a user