sc::ShmMemoryGrp(3)
π NAME π
okay bestie, this is the sc::ShmMemoryGrp(3) page from MPQC β and the tea is: the ShmMemoryGrp concrete class provides an implementation of MsgMemoryGrp. That's the whole NAME section, but make it cute: it's giving "shared-memory group has entered the chat" π
.
β¨ SYNOPSIS β¨
#include <memshm.h>
Inherits sc::MsgMemoryGrp.
π Public Member Functions π
ShmMemoryGrp (const Ref< MessageGrp > &msg)β constructor vibes with aconst Ref< MessageGrp > &msg.ShmMemoryGrp (const Ref< KeyVal > &)β constructor vibes with aconst Ref< KeyVal > &.void set_localsize (size_t)β set the size of locally held memory. πvoid * localdata ()β returns a pointer to the local data. periodt.void * obtain_readwrite (distsize_t offset, int size)β only one thread can have an unreleasedobtain_readwriteat a time. that's the rule, bestie.void * obtain_readonly (distsize_t offset, int size)β gives read access to the memory location. No locking is done. like, none at all π.void * obtain_writeonly (distsize_t offset, int size)β gives write access to the memory location. No locking is done. same energy.void release_readonly (void *data, distsize_t offset, int size)β called when read access is no longer needed. release the ghost π».void release_writeonly (void *data, distsize_t offset, int size)β called when write access is no longer needed.void release_readwrite (void *data, distsize_t offset, int size)β called when read/write access is no longer needed.void print (std::ostream &o=ExEnv::out0()) constβ prints out information about the object. default arg is right there, and it'sconst.
π«Ά Additional Inherited Members π«Ά
This heading is here in the original too, bestie β and it doesn't list any extra bullet details under it. mysterious inherited-member energy, iykyk. β¨
πΈ Detailed Description πΈ
The ShmMemoryGrp concrete class provides an implementation of MsgMemoryGrp. no cap.
It uses SYSV IPC to provide shared memory on a system that provides shared memory in hardware. It is very fast and reliable. literally iconic.
π₯ Member Function Documentation π₯
π void* sc::ShmMemoryGrp::obtain_readwrite (distsize_t offset, int size) π
[virtual]
Only one thread can have an unreleased obtain_readwrite at a time. The actual memory region locked can be larger than that requested. If the memory region is already locked this will block. For this reason, data should be held as read/write for as short a time as possible. so don't hold it forever, bestie π.
Implements sc::MemoryGrp.
π void sc::ShmMemoryGrp::release_readwrite (void * data, distsize_t offset, int size) π
[virtual]
This is called when read/write access is no longer needed. The memory will be unlocked. slay, release it. β¨
Implements sc::MemoryGrp.
π¦ void sc::ShmMemoryGrp::set_localsize (size_t) π¦
[virtual]
Set the size of locally held memory. When memory is accessed using a global offset counting starts at node 0 and proceeds up to node n() - 1. that's the whole journey, no cap. π«Ά
Reimplemented from sc::MsgMemoryGrp.
π Author π
Generated automatically by Doxygen for MPQC from the source code. the robots wrote it, not me π .
β¨ cute sign-off: this sc::ShmMemoryGrp(3) page is from MPQC version 2.3.1, dated Sun Oct 4 2020 β thanks for reading, bestie, mwah ππ
π¦ where this page comes from
- ubuntu jammy: libsc-doc 2.3.1-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms