logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ost::SharedMemPager - The shared mempager uses a mutex to protect key access methods.

Author

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

GNU CommonC++                                    Sun Dec 27 2020                          ost::SharedMemPager(3)

Constructor & Destructor Documentation

ost::SharedMemPager::SharedMemPager(size_tpagesize=4096,constchar*name=NULL)[protected]
       Create a mempager mutex pool.

       Parameterspagesize page size for allocation.
           name a name for the pool.

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.

       Author
           David Sugar dyfet@ostel.com

       mutex protected memory pager.

Member Function Documentation

void*ost::SharedMemPager::alloc(size_tsize)[protected],[virtual]
       Get the last memory page after locking.

       Returns
           allocated memory space.

       Parameterssize of request.

       Reimplemented from ost::MemPager.

   void*ost::SharedMemPager::first(size_tsize)[protected],[virtual]
       Get the first memory page after locking.

       Returns
           allocated memory space.

       Parameterssize of request.

       Reimplemented from ost::MemPager.

   voidost::SharedMemPager::purge(void)[protected]
       Purge the memory pool while locked.

Name

       ost::SharedMemPager - The shared mempager uses a mutex to protect key access methods.

Synopsis

       #include <misc.h>

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

   ProtectedMemberFunctionsSharedMemPager (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.

   AdditionalInheritedMembers

See Also