MemoryREADME(7bobcat)
β¨ MemoryREADME β¨
okay bestie, gather round, because this is the MemoryREADME page for Bobcat β it's literally the tour of Bobcat's classes that go poke at memory segments π no cap.
πΈ NAME πΈ
MemoryREADME β Bobcat's classes accessing memory segments π§
π DESCRIPTION π
so here's the lineup, the whole girl group π the following classes accessing memory segments are available:
MemoryAccess(3bobcat) is the class that defines an object interfacing to a shared memory segment (cf. shmget(2)), iykyk. it comes with functionality to set and retrieve its id, and to write and read bytes from its shared memory segment. MemoryAccess objects get used by MemoryBridge(3bobcat) objects that keep track of which segments actually contain the data bytes.
lowkey important: MemoryAccess objects are used by MemoryBridge and are normally not directly constructed by user programs π so don't come for her, she's booked by somebody else.
the class MemoryBridge (cf. figure images/sharedsegment1.jpg) interfaces to shared memory using MemoryAccess objects. its main member function is the static member create, which returns a pointer to a newly allocated MemoryMemory object β¨
the member create receives as its input parameters the number of blocks, the size of the segments allocated by MemoryBridge, and the segment's access mode (as used by, e.g., chmod(1)). it returns a pointer to the allocated MemoryBridge, and its ID (set using a pointer to an int, passed as its first parameter).
and now the lore π«Ά although the MemoryBridge class defines an array of a single MemoryAccess(3bobcat) object, in fact it will contain d_nAccesss MemoryAccess objects. the member create first allocates a block of raw memory of the required total size. next it initializes the first part of this raw, shared memory, using the MemoryBridge constructor and placement new. next, the remaining amount of raw shared memory is initialized with d_nAccesss - 1 MemoryAccess objects, again using placement new (cf. figure images/sharedsegment2.jpg in the source distribution). it's giving choreography, honestly π
following read/write operations the offset is updated accordingly. there's only one offset, which is used by [IO]?MemoryStream objects when requesting or updating offsets. a MemoryMemory object offers safeguards against inappropriate use. e.g., if no memory has been allocated yet it may thow exceptions π also, offsets can never exceed the MemoryMemory's maximum possible offset. protection, periodt.
the class MemoryBuf implements a std::streambuf specialization interfacing to a MemoryMemory object. in addition to a default constructor which is an empty stub, the class offers constructors which immediately interface to a MemoryBridge object. choose your fighter π
the MemoryStream class offers stream-facilities operating on shared memory maintained by a MemoryBuf object π
btw, an overview of currently defined shared memory segments is shown by the command:
ipcs -ma
and to erase a defined shared memory segment you can use:
ipcrm -m <id>
where <id> is the shared memory segment's ID π
π¦ EXAMPLE π¦
see the memorystream(3bobcat) man page. that's it, that's the example, she's concise π
β FILES β
images referred to in this man-page live in the source distribution in bobcat/documents/images, or you can find them in the standard location of documentation files in your distribution (e.g., they are located in /usr/share/doc/libbobcat6/images) π
π₯ SEE ALSO π₯
bobcat(7), ipcs(1), ipcrm(1), memoryaccess(3bobcat), memorybridge(3bobcat), memorybuf(3bobcat), memorystream(3bobcat)
π BUGS π
none reported. we're thriving, bestie πΈ
π BOBCAT PROJECT FILES π
- https://fbb-git.gitlab.io/bobcat/ β gitlab project page;
Debian Bobcat project files:
libbobcat6β debian package containing the shared library, changelog and copyright note;libbobcat-devβ debian package containing the static library, headers, manual pages, and developer info;
π BOBCAT π
Bobcat is an acronym of Brokken's Own Base Classes And Templates. iconic naming, honestly β¨
π COPYRIGHT π
this is free software, distributed under the terms of the GNU General Public License (GPL). slay π«Ά
π AUTHOR π
Frank B. Brokken (f.b.brokken@rug.nl).
and that's the whole page, bestie β this was libbobcat-dev_6.15.01, dated 2005-2026, aka the MemoryREADME(7bobcat) era π
mwah, go forth and share that memory π§
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms