CernVM-FS
2.12.0
|
#include <bigvector.h>
Public Member Functions | |
BigVector () | |
BigVector (const size_t num_items) | |
BigVector (const BigVector< Item > &other) | |
BigVector< Item > & | operator= (const BigVector< Item > &other) |
~BigVector () | |
Item | At (const size_t index) const |
const Item * | AtPtr (const size_t index) const |
void | PushBack (const Item &item) |
void | Replace (size_t index, const Item &item) |
bool | IsEmpty () const |
void | Clear () |
void | ShareBuffer (Item **duplicate, bool *large_alloc) |
void | DoubleCapacity () |
void | ShrinkIfOversized () |
void | SetSize (const size_t new_size) |
size_t | size () const |
size_t | capacity () const |
Private Member Functions | |
Item * | Alloc (const size_t num_elements) |
void | Dealloc () |
void | FreeBuffer (Item *buf, const size_t size, const bool large) |
void | CopyFrom (const BigVector< Item > &other) |
Private Attributes | |
Item * | buffer_ |
size_t | size_ |
size_t | capacity_ |
bool | large_alloc_ |
bool | shared_buffer_ |
Static Private Attributes | |
static const size_t | kNumInit = 16 |
static const size_t | kMmapThreshold = 128*1024 |
This file is part of the CernVM File System.
Dynamic array, allocate with mmap for large arrays.
Definition at line 16 of file bigvector.h.
Definition at line 18 of file bigvector.h.
Definition at line 24 of file bigvector.h.
Definition at line 31 of file bigvector.h.
Definition at line 45 of file bigvector.h.
|
inlineprivate |
Definition at line 128 of file bigvector.h.
Referenced by BigVector< uint64_t >::BigVector(), BigVector< uint64_t >::Clear(), BigVector< uint64_t >::CopyFrom(), BigVector< uint64_t >::DoubleCapacity(), and BigVector< uint64_t >::ShrinkIfOversized().
|
inline |
Definition at line 50 of file bigvector.h.
Referenced by glue::StringHeap::AddString(), glue::StatStore::Erase(), swissknife::CommandCheck::Find(), glue::StatStore::Get(), FuseInvalidator::MainInvalidator(), ChunkListMagicXattr::PrepareValueFenced(), glue::StringHeap::~StringHeap(), and compat::inode_tracker_v3::StringHeap::~StringHeap().
|
inline |
Definition at line 55 of file bigvector.h.
Referenced by catalog::WritableCatalogManager::AddChunkedFile(), catalog::WritableCatalogManager::AddHardlinkGroup(), BigVector< uint64_t >::CopyFrom(), cvmfs::cvmfs_opendir(), cvmfs::cvmfs_read(), cvmfs::Evict(), LibContext::ListDirectory(), LibContext::ListDirectoryStat(), compat::chunk_tables::Migrate(), compat::chunk_tables_v2::Migrate(), catalog::WritableCatalog::MoveFileChunksToNested(), cvmfs::Pin(), and LibContext::Pread().
|
inline |
Definition at line 122 of file bigvector.h.
Referenced by cvmfs::AddToDirListing().
|
inline |
Definition at line 76 of file bigvector.h.
Referenced by FuseInvalidator::MainInvalidator().
|
inlineprivate |
Definition at line 162 of file bigvector.h.
Referenced by BigVector< uint64_t >::BigVector(), and BigVector< uint64_t >::operator=().
|
inlineprivate |
Definition at line 142 of file bigvector.h.
Referenced by BigVector< uint64_t >::Clear(), BigVector< uint64_t >::operator=(), and BigVector< uint64_t >::~BigVector().
|
inline |
Definition at line 87 of file bigvector.h.
Referenced by cvmfs::AddToDirListing(), and BigVector< uint64_t >::PushBack().
|
inlineprivate |
Definition at line 149 of file bigvector.h.
Referenced by BigVector< uint64_t >::Dealloc(), BigVector< uint64_t >::DoubleCapacity(), and BigVector< uint64_t >::ShrinkIfOversized().
|
inline |
Definition at line 72 of file bigvector.h.
Referenced by catalog::WritableCatalogManager::AddHardlinkGroup(), cvmfs::cvmfs_open(), LibContext::GetExtAttr(), upload::SpoolerResult::IsChunked(), catalog::Catalog::ListMd5PathChunks(), ChunkListMagicXattr::PrepareValueFenced(), ChunksMagicXattr::PrepareValueFenced(), receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::ReportAddition(), and receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::ReportModification().
|
inline |
Definition at line 35 of file bigvector.h.
|
inline |
Definition at line 60 of file bigvector.h.
Referenced by glue::StatStore::Add(), glue::StringHeap::AddBin(), publish::SyncItem::CheckGraft(), catalog::Catalog::ListingMd5PathStat(), catalog::Catalog::ListMd5PathChunks(), FuseInvalidator::MainInvalidator(), compat::chunk_tables::Migrate(), compat::chunk_tables_v2::Migrate(), and FileItem::RegisterChunk().
|
inline |
Definition at line 67 of file bigvector.h.
Referenced by glue::StatStore::Erase().
|
inline |
Definition at line 116 of file bigvector.h.
Referenced by cvmfs::AddToDirListing(), and glue::StatStore::Erase().
|
inline |
Definition at line 81 of file bigvector.h.
Referenced by cvmfs::AddToDirListing().
|
inline |
Definition at line 99 of file bigvector.h.
Referenced by glue::StatStore::Erase().
|
inline |
Definition at line 121 of file bigvector.h.
Referenced by glue::StatStore::Add(), catalog::WritableCatalogManager::AddChunkedFile(), catalog::WritableCatalogManager::AddHardlinkGroup(), glue::StringHeap::AddString(), cvmfs::AddToDirListing(), cvmfs::cvmfs_opendir(), glue::StatStore::Erase(), cvmfs::Evict(), swissknife::CommandCheck::Find(), BigVector< uint64_t >::FreeBuffer(), LibContext::GetExtAttr(), FileItem::GetNumChunks(), glue::StringHeap::GetSizeAlloc(), LibContext::ListDirectory(), LibContext::ListDirectoryStat(), FuseInvalidator::MainInvalidator(), compat::chunk_tables::Migrate(), compat::chunk_tables_v2::Migrate(), catalog::WritableCatalog::MoveFileChunksToNested(), cvmfs::Pin(), LibContext::Pread(), ChunkListMagicXattr::PrepareValueFenced(), ChunksMagicXattr::PrepareValueFenced(), publish::SyncMediator::PublishFilesCallback(), swissknife::CommandMigrate::UploadCallback(), glue::StringHeap::~StringHeap(), and compat::inode_tracker_v3::StringHeap::~StringHeap().
|
private |
Definition at line 171 of file bigvector.h.
Referenced by BigVector< uint64_t >::At(), BigVector< uint64_t >::AtPtr(), BigVector< uint64_t >::BigVector(), BigVector< uint64_t >::Clear(), BigVector< uint64_t >::CopyFrom(), BigVector< uint64_t >::Dealloc(), BigVector< uint64_t >::DoubleCapacity(), BigVector< uint64_t >::PushBack(), BigVector< uint64_t >::Replace(), BigVector< uint64_t >::ShareBuffer(), and BigVector< uint64_t >::ShrinkIfOversized().
|
private |
Definition at line 173 of file bigvector.h.
Referenced by BigVector< uint64_t >::Alloc(), BigVector< uint64_t >::capacity(), BigVector< uint64_t >::CopyFrom(), BigVector< uint64_t >::Dealloc(), BigVector< uint64_t >::DoubleCapacity(), BigVector< uint64_t >::PushBack(), BigVector< uint64_t >::SetSize(), and BigVector< uint64_t >::ShrinkIfOversized().
|
staticprivate |
Definition at line 126 of file bigvector.h.
Referenced by BigVector< uint64_t >::Alloc().
|
staticprivate |
Definition at line 125 of file bigvector.h.
Referenced by BigVector< uint64_t >::BigVector(), BigVector< uint64_t >::Clear(), and BigVector< uint64_t >::ShrinkIfOversized().
|
private |
Definition at line 174 of file bigvector.h.
Referenced by BigVector< uint64_t >::Alloc(), BigVector< uint64_t >::Dealloc(), BigVector< uint64_t >::DoubleCapacity(), BigVector< uint64_t >::ShareBuffer(), and BigVector< uint64_t >::ShrinkIfOversized().
|
private |
Definition at line 175 of file bigvector.h.
Referenced by BigVector< uint64_t >::BigVector(), BigVector< uint64_t >::CopyFrom(), BigVector< uint64_t >::operator=(), BigVector< uint64_t >::ShareBuffer(), BigVector< uint64_t >::ShrinkIfOversized(), and BigVector< uint64_t >::~BigVector().
|
private |
Definition at line 172 of file bigvector.h.
Referenced by BigVector< uint64_t >::At(), BigVector< uint64_t >::AtPtr(), BigVector< uint64_t >::BigVector(), BigVector< uint64_t >::CopyFrom(), BigVector< uint64_t >::Dealloc(), BigVector< uint64_t >::DoubleCapacity(), BigVector< uint64_t >::IsEmpty(), BigVector< uint64_t >::PushBack(), BigVector< uint64_t >::Replace(), BigVector< uint64_t >::SetSize(), BigVector< uint64_t >::ShrinkIfOversized(), and BigVector< uint64_t >::size().