#include <BlockWipedAllocator.h>
Classes | |
struct | Block |
struct | LocalCache |
struct | Stat |
Public Member Functions | |
void * | alloc () |
BlockWipedAllocator (std::size_t typeSize, std::size_t blockSize, std::size_t maxRecycle) | |
BlockWipedAllocator (BlockWipedAllocator const &rh) | |
void | clear () const |
void | dealloc (void *) |
BlockWipedAllocator & | operator= (BlockWipedAllocator const &rh) |
void | registerCache (LocalCache *c) |
Stat | stat () const |
void | wipe (bool force=true) const |
~BlockWipedAllocator () | |
Protected Member Functions | |
BlockWipedAllocator & | me () const |
Private Types | |
typedef std::list< Block > | Blocks |
typedef Blocks::const_iterator | const_iterator |
typedef Blocks::iterator | iterator |
typedef unsigned char * | pointer |
Private Member Functions | |
void | nextBlock (bool advance) dso_internal |
Private Attributes | |
std::vector< LocalCache * > | localCaches |
int | m_alive |
Blocks | m_blocks |
std::size_t | m_blockSize |
iterator | m_current |
std::size_t | m_maxRecycle |
pointer | m_next |
std::size_t | m_typeSize |
std::vector< void * > | recycled |
Definition at line 23 of file BlockWipedAllocator.h.
|
private |
Definition at line 94 of file BlockWipedAllocator.h.
|
private |
Definition at line 96 of file BlockWipedAllocator.h.
|
private |
Definition at line 95 of file BlockWipedAllocator.h.
|
private |
Definition at line 93 of file BlockWipedAllocator.h.
BlockWipedAllocator::BlockWipedAllocator | ( | std::size_t | typeSize, |
std::size_t | blockSize, | ||
std::size_t | maxRecycle | ||
) |
BlockWipedAllocator::BlockWipedAllocator | ( | BlockWipedAllocator const & | rh | ) |
Definition at line 14 of file BlockWipedAllocator.cc.
References m_maxRecycle, recycled, and wipe().
BlockWipedAllocator::~BlockWipedAllocator | ( | ) |
void * BlockWipedAllocator::alloc | ( | ) |
Definition at line 36 of file BlockWipedAllocator.cc.
References Association::block, likely, m_alive, BlockWipedAllocator::Block::m_allocated, m_current, BlockWipedAllocator::Block::m_data, m_next, m_typeSize, nextBlock(), recycled, run_regression::ret, and unlikely.
Referenced by BlockWipedAllocated< _bqueue_item< T > >::alloc(), and SizeBlockWipedAllocated< T >::operator new().
void BlockWipedAllocator::clear | ( | void | ) | const |
Definition at line 56 of file BlockWipedAllocator.cc.
References m_blocks, me(), and wipe().
Referenced by BlockWipedPool::clear(), Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), Vispa.Views.PropertyView.PropertyView::updateContent(), and ~BlockWipedAllocator().
void BlockWipedAllocator::dealloc | ( | void * | p | ) |
Definition at line 51 of file BlockWipedAllocator.cc.
References likely, m_alive, m_maxRecycle, and recycled.
Referenced by BlockWipedAllocated< _bqueue_item< T > >::dealloc(), and SizeBlockWipedAllocated< T >::operator delete().
|
protected |
Definition at line 71 of file BlockWipedAllocator.cc.
Referenced by clear(), and wipe().
|
private |
Definition at line 83 of file BlockWipedAllocator.cc.
References likely, m_blocks, m_blockSize, m_current, m_next, m_typeSize, and unlikely.
Referenced by alloc(), and wipe().
BlockWipedAllocator & BlockWipedAllocator::operator= | ( | BlockWipedAllocator const & | rh | ) |
Definition at line 20 of file BlockWipedAllocator.cc.
References m_alive, m_blockSize, m_maxRecycle, m_typeSize, recycled, and wipe().
|
inline |
Definition at line 57 of file BlockWipedAllocator.h.
References localCaches.
BlockWipedAllocator::Stat BlockWipedAllocator::stat | ( | ) | const |
Definition at line 75 of file BlockWipedAllocator.cc.
References m_alive, m_blocks, m_blockSize, m_current, m_next, m_typeSize, and alignCSCRings::s.
Referenced by BlockWipedPoolAllocated::stat(), BlockWipedAllocated< _bqueue_item< T > >::stat(), and SizeBlockWipedAllocated< T >::stat().
void BlockWipedAllocator::wipe | ( | bool | force = true | ) | const |
Definition at line 61 of file BlockWipedAllocator.cc.
References localCaches, m_alive, m_blocks, m_current, me(), nextBlock(), recycled, and BlockWipedAllocator::LocalCache::reset().
Referenced by BlockWipedAllocator(), clear(), operator=(), and BlockWipedPool::wipe().
|
private |
Definition at line 62 of file BlockWipedAllocator.h.
Referenced by registerCache(), and wipe().
|
private |
Definition at line 106 of file BlockWipedAllocator.h.
Referenced by alloc(), dealloc(), operator=(), stat(), and wipe().
|
private |
Definition at line 104 of file BlockWipedAllocator.h.
Referenced by clear(), nextBlock(), stat(), and wipe().
|
private |
Definition at line 100 of file BlockWipedAllocator.h.
Referenced by nextBlock(), operator=(), and stat().
|
private |
Definition at line 103 of file BlockWipedAllocator.h.
Referenced by alloc(), nextBlock(), stat(), and wipe().
|
private |
Definition at line 101 of file BlockWipedAllocator.h.
Referenced by BlockWipedAllocator(), dealloc(), and operator=().
|
private |
Definition at line 102 of file BlockWipedAllocator.h.
Referenced by alloc(), nextBlock(), and stat().
|
private |
Definition at line 99 of file BlockWipedAllocator.h.
Referenced by alloc(), nextBlock(), operator=(), and stat().
|
private |
Definition at line 63 of file BlockWipedAllocator.h.
Referenced by alloc(), BlockWipedAllocator(), dealloc(), operator=(), and wipe().