#include <stmem.h>

Public Member Functions | |
mem_hdr () | |
~mem_hdr () | |
void | freeContent () |
int64_t | lowestOffset () const |
int64_t | endOffset () const |
int64_t | freeDataUpto (int64_t) |
ssize_t | copy (StoreIOBuffer const &) const |
bool | hasContigousContentRange (Range< int64_t > const &range) const |
bool | write (StoreIOBuffer const &) |
void | dump () const |
size_t | size () const |
mem_node const * | start () const |
mem_node * | getBlockContainingLocation (int64_t location) const |
const Splay< mem_node * > & | getNodes () const |
char * | NodeGet (mem_node *aNode) |
void | internalAppend (const char *data, int len) |
Static Public Attributes | |
static Splay< mem_node * >::SPLAYCMP | NodeCompare |
Private Member Functions | |
void | debugDump () const |
bool | unlink (mem_node *aNode) |
void | makeAppendSpace () |
int | appendToNode (mem_node *aNode, const char *data, int maxLength) |
void | appendNode (mem_node *aNode) |
size_t | copyAvailable (mem_node *aNode, int64_t location, size_t amount, char *target) const |
bool | unionNotEmpty (StoreIOBuffer const &) |
mem_node * | nodeToRecieve (int64_t offset) |
size_t | writeAvailable (mem_node *aNode, int64_t location, size_t amount, char const *source) |
Private Attributes | |
int64_t | inmem_hi |
Splay< mem_node * > | nodes |
Detailed Description
Constructor & Destructor Documentation
◆ mem_hdr()
mem_hdr::mem_hdr | ( | ) |
◆ ~mem_hdr()
mem_hdr::~mem_hdr | ( | ) |
Definition at line 379 of file stmem.cc.
References freeContent().
Member Function Documentation
◆ appendNode()
|
private |
Definition at line 138 of file stmem.cc.
References Splay< V >::insert(), NodeCompare, and nodes.
Referenced by makeAppendSpace(), and nodeToRecieve().
◆ appendToNode()
Definition at line 105 of file stmem.cc.
References data, StoreIOBuffer::length, mem_node::nodeBuffer, StoreIOBuffer::offset, and writeAvailable().
Referenced by internalAppend().
◆ copy()
ssize_t mem_hdr::copy | ( | StoreIOBuffer const & | target | ) | const |
Definition at line 226 of file stmem.cc.
References assert, copyAvailable(), StoreIOBuffer::data, DBG_IMPORTANT, debugDump(), debugs, fatal_dump(), getBlockContainingLocation(), StoreIOBuffer::length, nodes, StoreIOBuffer::offset, StoreIOBuffer::range(), and Splay< V >::size().
Referenced by MemStore::copyToShmSlice(), and store_client::scheduleMemRead().
◆ copyAvailable()
|
private |
Definition at line 190 of file stmem.cc.
References assert, StoreIOBuffer::data, mem_node::end(), StoreIOBuffer::length, min(), mem_node::nodeBuffer, and StoreIOBuffer::offset.
Referenced by copy().
◆ debugDump()
|
private |
Definition at line 209 of file stmem.cc.
References debugs, endOffset(), getNodes(), lowestOffset(), and Splay< V >::visit().
◆ dump()
void mem_hdr::dump | ( | ) | const |
Definition at line 401 of file stmem.cc.
References DBG_IMPORTANT, debugs, Splay< V >::finish(), nodes, and Splay< V >::start().
Referenced by MemObject::dump().
◆ endOffset()
int64_t mem_hdr::endOffset | ( | ) | const |
Definition at line 46 of file stmem.cc.
References assert, SplayNode< V >::data, mem_node::dataRange(), Splay< V >::finish(), inmem_hi, and nodes.
Referenced by debugDump(), MemObject::dump(), MemObject::endOffset(), makeAppendSpace(), MemObject::stat(), testLowAndHigh(), MemObject::write(), write(), and writeAvailable().
◆ freeContent()
void mem_hdr::freeContent | ( | ) |
Definition at line 60 of file stmem.cc.
References debugs, Splay< V >::destroy(), HERE(), inmem_hi, and nodes.
Referenced by ~mem_hdr(), MemObject::~MemObject(), and MemObject::reset().
◆ freeDataUpto()
int64_t mem_hdr::freeDataUpto | ( | int64_t | target_offset | ) |
Definition at line 82 of file stmem.cc.
References assert, SplayNode< V >::data, debugs, mem_node::end(), Splay< V >::finish(), lowestOffset(), nodes, Splay< V >::start(), and unlink().
Referenced by MemObject::trimSwappable(), and MemObject::trimUnSwappable().
◆ getBlockContainingLocation()
mem_node * mem_hdr::getBlockContainingLocation | ( | int64_t | location | ) | const |
Definition at line 176 of file stmem.cc.
References Splay< V >::find(), StoreIOBuffer::length, mem_node::nodeBuffer, NodeCompare, nodes, and NULL.
Referenced by copy(), doPages(), and hasContigousContentRange().
◆ getNodes()
Definition at line 425 of file stmem.cc.
References nodes.
Referenced by debugDump(), and testHdrVisit().
◆ hasContigousContentRange()
bool mem_hdr::hasContigousContentRange | ( | Range< int64_t > const & | range | ) | const |
Definition at line 284 of file stmem.cc.
References Range< C, S >::end, getBlockContainingLocation(), Range< C, S >::size(), and Range< C, S >::start.
Referenced by MemObject::isContiguous(), and testLowAndHigh().
◆ internalAppend()
void mem_hdr::internalAppend | ( | const char * | data, |
int | len | ||
) |
Definition at line 158 of file stmem.cc.
References appendToNode(), assert, SplayNode< V >::data, data, debugs, Splay< V >::finish(), len, makeAppendSpace(), and nodes.
◆ lowestOffset()
int64_t mem_hdr::lowestOffset | ( | ) | const |
Definition at line 35 of file stmem.cc.
References SplayNode< V >::data, mem_node::nodeBuffer, nodes, StoreIOBuffer::offset, and Splay< V >::start().
Referenced by debugDump(), freeDataUpto(), and testLowAndHigh().
◆ makeAppendSpace()
|
private |
Definition at line 144 of file stmem.cc.
References appendNode(), assert, SplayNode< V >::data, endOffset(), Splay< V >::finish(), nodes, Splay< V >::size(), and mem_node::space().
Referenced by internalAppend().
◆ NodeGet()
char * mem_hdr::NodeGet | ( | mem_node * | aNode | ) |
Definition at line 27 of file stmem.cc.
References assert, mem_node::data, and mem_node::write_pending.
Referenced by doPages().
◆ nodeToRecieve()
|
private |
Definition at line 308 of file stmem.cc.
References appendNode(), mem_node::canAccept(), SplayNode< V >::data, Splay< V >::find(), StoreIOBuffer::length, mem_node::nodeBuffer, NodeCompare, nodes, NULL, Splay< V >::size(), and Splay< V >::start().
Referenced by write().
◆ size()
size_t mem_hdr::size | ( | ) | const |
Definition at line 408 of file stmem.cc.
References nodes, and Splay< V >::size().
Referenced by StoreEntry::memoryCachable().
◆ start()
mem_node const * mem_hdr::start | ( | ) | const |
Definition at line 414 of file stmem.cc.
References SplayNode< V >::data, nodes, NULL, and Splay< V >::start().
◆ unionNotEmpty()
|
private |
Definition at line 299 of file stmem.cc.
References assert, Splay< V >::find(), StoreIOBuffer::length, mem_node::nodeBuffer, NodeCompare, nodes, and StoreIOBuffer::offset.
Referenced by write().
◆ unlink()
|
private |
Definition at line 68 of file stmem.cc.
References DBG_CRITICAL, debugs, NodeCompare, nodes, Splay< V >::remove(), and mem_node::write_pending.
Referenced by freeDataUpto().
◆ write()
bool mem_hdr::write | ( | StoreIOBuffer const & | writeBuffer | ) |
Definition at line 342 of file stmem.cc.
References assert, StoreIOBuffer::data, DBG_CRITICAL, debugDump(), debugs, endOffset(), fatal_dump(), len, StoreIOBuffer::length, nodeToRecieve(), StoreIOBuffer::offset, PROF_start, PROF_stop, StoreIOBuffer::range(), unionNotEmpty(), and writeAvailable().
Referenced by MemStore::copyFromShmSlice(), testHdrVisit(), testLowAndHigh(), and MemObject::write().
◆ writeAvailable()
|
private |
Definition at line 112 of file stmem.cc.
References assert, mem_node::canAccept(), StoreIOBuffer::data, debugs, endOffset(), HERE(), inmem_hi, StoreIOBuffer::length, min(), mem_node::nodeBuffer, StoreIOBuffer::offset, and mem_node::space().
Referenced by appendToNode(), and write().
Member Data Documentation
◆ inmem_hi
|
private |
Definition at line 59 of file stmem.h.
Referenced by mem_hdr(), endOffset(), freeContent(), and writeAvailable().
◆ NodeCompare
|
static |
Definition at line 47 of file stmem.h.
Referenced by appendNode(), getBlockContainingLocation(), nodeToRecieve(), testSplayOfNodes(), unionNotEmpty(), and unlink().
◆ nodes
Definition at line 60 of file stmem.h.
Referenced by appendNode(), copy(), dump(), endOffset(), freeContent(), freeDataUpto(), getBlockContainingLocation(), getNodes(), internalAppend(), lowestOffset(), makeAppendSpace(), nodeToRecieve(), size(), start(), unionNotEmpty(), and unlink().
The documentation for this class was generated from the following files: