mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
FairMQ: shared memory unmanaged region updates:
- use same mapping for sender/receiver (created/remote) region. - rename FairMQRegion -> FairMQUnmanagedRegion.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
f7d3a5e8ae
commit
0bb866ff36
34
fairmq/zeromq/FairMQUnmanagedRegionZMQ.cxx
Normal file
34
fairmq/zeromq/FairMQUnmanagedRegionZMQ.cxx
Normal file
@@ -0,0 +1,34 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#include "FairMQUnmanagedRegionZMQ.h"
|
||||
#include "FairMQLogger.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
FairMQUnmanagedRegionZMQ::FairMQUnmanagedRegionZMQ(const size_t size)
|
||||
: fBuffer(malloc(size))
|
||||
, fSize(size)
|
||||
{
|
||||
}
|
||||
|
||||
void* FairMQUnmanagedRegionZMQ::GetData() const
|
||||
{
|
||||
return fBuffer;
|
||||
}
|
||||
|
||||
size_t FairMQUnmanagedRegionZMQ::GetSize() const
|
||||
{
|
||||
return fSize;
|
||||
}
|
||||
|
||||
FairMQUnmanagedRegionZMQ::~FairMQUnmanagedRegionZMQ()
|
||||
{
|
||||
LOG(DEBUG) << "destroying region";
|
||||
free(fBuffer);
|
||||
}
|
Reference in New Issue
Block a user