ost::SharedMemPager(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– ost::SharedMemPager(3) πŸ’–

okay so bestie, we're in the Library Functions Manual section, and this is the whole tea on ost::SharedMemPager β€” the shared mempager that uses a mutex to protect key access methods. no cap. 🫢


✨ NAME ✨

ost::SharedMemPager β€” the shared mempager uses a mutex to protect key access methods.


🌸 SYNOPSIS 🌸

#include <misc.h>

Inherits ost::MemPager, and ost::Mutex.

πŸŽ€ Protected Member Functions πŸŽ€

  • SharedMemPager (size_t pagesize=4096, const char *name=NULL) β€” create a mempager mutex pool.
  • void purge (void) β€” purge the memory pool while locked.
  • void * first (size_t size) β€” get the first memory page after locking.
  • void * alloc (size_t size) β€” get the last memory page after locking.

πŸ¦‹ Additional Inherited Members πŸ¦‹

(that's the extra stuff it gets from its parents, ost::MemPager and ost::Mutex β€” it's giving nepo baby but in a slay way πŸ’…)


πŸ‘‘ Detailed Description πŸ‘‘

The shared mempager uses a mutex to protect key access methods.

This class is used when a mempager will be shared by multiple threads. literally the whole point β€” multiple threads, one pager, nobody stepping on anybody's toes. 🌈

Author

David Sugar dyfet@ostel.com

mutex protected memory pager. periodt. πŸ”₯


🧚 Constructor & Destructor Documentation 🧚

ost::SharedMemPager::SharedMemPager (size_t pagesize = 4096, const char *name = NULL) [protected]

Create a mempager mutex pool.

Parameters

  • pagesize β€” page size for allocation.
  • name β€” a name for the pool.

⭐ Member Function Documentation ⭐

void* ost::SharedMemPager::alloc (size_t size) [protected], [virtual]

Get the last memory page after locking.

Returns

allocated memory space.

Parameters

size of request.

Reimplemented from ost::MemPager.

void* ost::SharedMemPager::first (size_t size) [protected], [virtual]

Get the first memory page after locking.

Returns

allocated memory space.

Parameters

size of request.

Reimplemented from ost::MemPager.

void ost::SharedMemPager::purge (void) [protected]

Purge the memory pool while locked.


🌷 Author 🌷

Generated automatically by Doxygen for GNU CommonC++ from the source code.


and that's the whole page bestie, no notes πŸ’œ

Generated automatically by Doxygen for GNU CommonC++ from the source code β€” page dated Sun Dec 27 2020. bye ily, go lock your mutex πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from