Skip to content

Source · fairmq/

MemoryResources.cxxsource

Described in Use std::pmr memory resources.

fairmq/MemoryResources.cxx21 lines · C++GitHub ↗
1/********************************************************************************2 *    Copyright (C) 2018 CERN and copyright holders of ALICE O2                 *3 * Copyright (C) 2018-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH  *4 *                                                                              *5 *              This software is distributed under the terms of the             *6 *              GNU Lesser General Public Licence (LGPL) version 3,             *7 *                  copied verbatim in the file "LICENSE"                       *8 ********************************************************************************/9 10/// @brief Memory allocators and interfaces related to managing memory via the11/// trasport layer12///13/// @author Mikolaj Krzewicki, mkrzewic@cern.ch14 15#include <fairmq/TransportFactory.h>16#include <fairmq/MemoryResources.h>17 18void *fair::mq::ChannelResource::do_allocate(std::size_t bytes, std::size_t alignment)19{20    return setMessage(factory->CreateMessage(bytes, fair::mq::Alignment{alignment}));21}