CernVM-FS  2.9.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 90 of file glue_buffer.h.

Constructor & Destructor Documentation

glue::StringHeap::StringHeap ( )
inline

Definition at line 92 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 96 of file glue_buffer.h.

Here is the call graph for this function:

glue::StringHeap::~StringHeap ( )
inline

Definition at line 111 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 157 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 117 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 146 of file glue_buffer.h.

Here is the call graph for this function:

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

Definition at line 138 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 100 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 134 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 143 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 166 of file glue_buffer.h.

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

uint64_t glue::StringHeap::bin_used_
private

Definition at line 167 of file glue_buffer.h.

Referenced by AddBin(), and AddString().

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

Definition at line 168 of file glue_buffer.h.

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

uint64_t glue::StringHeap::size_
private

Definition at line 164 of file glue_buffer.h.

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

uint64_t glue::StringHeap::used_
private

Definition at line 165 of file glue_buffer.h.

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


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