#include <stmem.h>

Collaboration diagram for mem_hdr:

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_nodegetBlockContainingLocation (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_nodenodeToRecieve (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

Definition at line 19 of file stmem.h.

Constructor & Destructor Documentation

◆ mem_hdr()

mem_hdr::mem_hdr ( )

Definition at line 374 of file stmem.cc.

References debugs, HERE(), and inmem_hi.

◆ ~mem_hdr()

mem_hdr::~mem_hdr ( )

Definition at line 379 of file stmem.cc.

References freeContent().

Member Function Documentation

◆ appendNode()

void mem_hdr::appendNode ( mem_node aNode)

Definition at line 138 of file stmem.cc.

References Splay< V >::insert(), NodeCompare, and nodes.

Referenced by makeAppendSpace(), and nodeToRecieve().

◆ appendToNode()

int mem_hdr::appendToNode ( mem_node aNode,
const char *  data,
int  maxLength 

◆ copy()

◆ copyAvailable()

size_t mem_hdr::copyAvailable ( mem_node aNode,
int64_t  location,
size_t  amount,
char *  target 
) const

◆ debugDump()

void mem_hdr::debugDump ( ) const

Definition at line 209 of file stmem.cc.

References debugs, endOffset(), getNodes(), lowestOffset(), and Splay< V >::visit().

Referenced by copy(), and write().

◆ 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()

◆ 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)

◆ getBlockContainingLocation()

mem_node * mem_hdr::getBlockContainingLocation ( int64_t  location) const

◆ getNodes()

const Splay< mem_node * > & mem_hdr::getNodes ( ) const

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

◆ internalAppend()

void mem_hdr::internalAppend ( const char *  data,
int  len 

◆ lowestOffset()

int64_t mem_hdr::lowestOffset ( ) const

◆ makeAppendSpace()

void mem_hdr::makeAppendSpace ( )

◆ 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()

mem_node * mem_hdr::nodeToRecieve ( int64_t  offset)

◆ 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()

bool mem_hdr::unionNotEmpty ( StoreIOBuffer const &  candidate)

◆ unlink()

bool mem_hdr::unlink ( mem_node aNode)

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()

◆ writeAvailable()

size_t mem_hdr::writeAvailable ( mem_node aNode,
int64_t  location,
size_t  amount,
char const *  source 

Member Data Documentation

◆ inmem_hi

int64_t mem_hdr::inmem_hi

Definition at line 59 of file stmem.h.

Referenced by mem_hdr(), endOffset(), freeContent(), and writeAvailable().

◆ NodeCompare

int mem_hdr::NodeCompare

◆ nodes

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






Web Site Translations