CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
glue::StringHeap Class Reference

#include <glue_buffer.h>

Inheritance diagram for glue::StringHeap:
Collaboration diagram for glue::StringHeap:

Public Member Functions

 StringHeap ()
 
 StringHeap (const uint64_t minimum_size)
 
void Init (const uint64_t minimum_size)
 
 ~StringHeap ()
 
StringRef AddString (const uint16_t length, const char *str)
 
void RemoveString (const StringRef str_ref)
 
double GetUsage () const
 
uint64_t used () const
 
uint64_t GetSizeAlloc () const
 

Private Member Functions

void AddBin (const uint64_t size)
 

Private Attributes

uint64_t size_
 
uint64_t used_
 
uint64_t bin_size_
 
uint64_t bin_used_
 
BigVector< void * > bins_
 

Additional Inherited Members

- Protected Member Functions inherited from SingleCopy
 SingleCopy ()
 

Detailed Description

Manages memory bins with immutable strings (deleting is a no-op). When the fraction of garbage is too large, the user of the StringHeap can copy the entire contents to a new heap.

Definition at line 150 of file glue_buffer.h.

Constructor & Destructor Documentation

glue::StringHeap::StringHeap ( )
inline

Definition at line 152 of file glue_buffer.h.

Here is the call graph for this function:

glue::StringHeap::StringHeap ( const uint64_t  minimum_size)
inlineexplicit

Definition at line 156 of file glue_buffer.h.

Here is the call graph for this function:

glue::StringHeap::~StringHeap ( )
inline

Definition at line 171 of file glue_buffer.h.

Here is the call graph for this function:

Member Function Documentation

void glue::StringHeap::AddBin ( const uint64_t  size)
inlineprivate

Definition at line 217 of file glue_buffer.h.

Referenced by AddString(), and Init().

Here is the call graph for this function:

Here is the caller graph for this function:

StringRef glue::StringHeap::AddString ( const uint16_t  length,
const char *  str 
)
inline

Definition at line 177 of file glue_buffer.h.

Referenced by glue::PathStore::Erase(), and glue::PathStore::Insert().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t glue::StringHeap::GetSizeAlloc ( ) const
inline

Definition at line 206 of file glue_buffer.h.

Here is the call graph for this function:

double glue::StringHeap::GetUsage ( ) const
inline

Definition at line 198 of file glue_buffer.h.

Referenced by glue::PathStore::Erase().

Here is the caller graph for this function:

void glue::StringHeap::Init ( const uint64_t  minimum_size)
inline

Definition at line 160 of file glue_buffer.h.

Referenced by StringHeap().

Here is the call graph for this function:

Here is the caller graph for this function:

void glue::StringHeap::RemoveString ( const StringRef  str_ref)
inline

Definition at line 194 of file glue_buffer.h.

Referenced by glue::PathStore::Erase().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t glue::StringHeap::used ( ) const
inline

Definition at line 203 of file glue_buffer.h.

Referenced by glue::PathStore::CopyFrom(), and glue::PathStore::Erase().

Here is the caller graph for this function:

Member Data Documentation

uint64_t glue::StringHeap::bin_size_
private

Definition at line 226 of file glue_buffer.h.

Referenced by AddBin(), AddString(), and GetSizeAlloc().

uint64_t glue::StringHeap::bin_used_
private

Definition at line 227 of file glue_buffer.h.

Referenced by AddBin(), and AddString().

BigVector<void *> glue::StringHeap::bins_
private

Definition at line 228 of file glue_buffer.h.

Referenced by AddBin(), AddString(), GetSizeAlloc(), and ~StringHeap().

uint64_t glue::StringHeap::size_
private

Definition at line 224 of file glue_buffer.h.

Referenced by AddString(), GetUsage(), and Init().

uint64_t glue::StringHeap::used_
private

Definition at line 225 of file glue_buffer.h.

Referenced by AddString(), GetUsage(), Init(), RemoveString(), and used().


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