34 sm_ = std::make_unique<boost::interprocess::managed_shared_memory>(
35 boost::interprocess::create_only, iName.c_str(), iLength);
66 bool destroyedBuffer =
false;
69 destroyedBuffer =
true;
72 }
catch (boost::interprocess::interprocess_exception
const& iExcept) {
74 <<
"in growBuffer while destroying the shared memory object the following exception was caught\n" 79 }
catch (boost::interprocess::interprocess_exception
const& iExcept) {
82 <<
"' the following exception was caught\n" 88 }
catch (boost::interprocess::interprocess_exception
const& iExcept) {
89 throw cms::Exception(
"SharedMemory") <<
"in growBuffer while creating the shared memory object '" 90 <<
bufferNames_[newBuffer] <<
"' of length " << iLength + 1024
91 <<
" the following exception was caught\n" 100 }
catch (boost::interprocess::interprocess_exception
const& iExcept) {
102 except <<
"boost::interprocess exception caught: " << iExcept.
what();
104 std::ostringstream
os;
105 os <<
"in growBuffer while creating the buffer within the shared memory object '" <<
bufferNames_[newBuffer]
106 <<
"' with index " << newBuffer <<
" where the buffer is of length " << iLength;
108 if (destroyedBuffer) {
109 os <<
" after destroying the previous shared memory object '" <<
bufferNames_[oldIndex] <<
"' with index " constexpr char const *const kBuffer
struct edm::shared_memory::WriteBuffer::SMOwner sm_
std::unique_ptr< boost::interprocess::managed_shared_memory > sm_
void growBuffer(std::size_t iLength)
std::array< std::string, 2 > bufferNames_
SMOwner & operator=(SMOwner &&)
void addContext(std::string const &context)
def remove(d, key, TELL=False)
boost::interprocess::managed_shared_memory * get()
char const * what() const noexcept override