ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::MemoryLease Class Reference

\( k \) items of the internal memory, taken on construction and given back on destruction More...

#include <ADS/external/TwoLevelMemory.h>

Public member functions

 MemoryLease (TwoLevelMemory &mem, std::size_t k)
 the lease of \( k \) items of mem
 MemoryLease (const MemoryLease &)=delete
 no copy, since the items would be given back twice
MemoryLease & operator= (const MemoryLease &)=delete
 no copy, since the items would be given back twice
 ~MemoryLease ()
 gives the items back
std::size_t size (void) const
 \( k \), the items taken

Detailed description

\( k \) items of the internal memory, taken on construction and given back on destruction

Constructor and destructor documentation

◆ MemoryLease() [1/2]

ADS::MemoryLease::MemoryLease ( TwoLevelMemory & mem,
std::size_t k )

the lease of \( k \) items of mem

Precondition
mem.used() plus \( k \) is at most \( M \)

◆ MemoryLease() [2/2]

ADS::MemoryLease::MemoryLease ( const MemoryLease & )
delete

no copy, since the items would be given back twice

◆ ~MemoryLease()

ADS::MemoryLease::~MemoryLease ( )

gives the items back

Member function documentation

◆ operator=()

MemoryLease & ADS::MemoryLease::operator= ( const MemoryLease & )
delete

no copy, since the items would be given back twice

◆ size()

std::size_t ADS::MemoryLease::size ( void ) const
nodiscard

\( k \), the items taken


The documentation for this class was generated from the following file: