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

Definition at line 374 of file stmem.cc.

References debugs, HERE(), and inmem_hi.

mem_hdr::~mem_hdr ( )

Definition at line 379 of file stmem.cc.

References freeContent().

Member Function Documentation

void mem_hdr::appendNode ( mem_node aNode)
private

Definition at line 138 of file stmem.cc.

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

Referenced by makeAppendSpace(), and nodeToRecieve().

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

Definition at line 105 of file stmem.cc.

References StoreIOBuffer::length, mem_node::nodeBuffer, StoreIOBuffer::offset, and writeAvailable().

Referenced by internalAppend().

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

Definition at line 209 of file stmem.cc.

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

Referenced by copy(), and write().

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

void mem_hdr::freeContent ( )

Definition at line 60 of file stmem.cc.

References debugs, Splay< V >::destroy(), HERE(), inmem_hi, and nodes.

Referenced by MemObject::reset(), ~mem_hdr(), and MemObject::~MemObject().

int64_t mem_hdr::freeDataUpto ( int64_t  target_offset)
mem_node * mem_hdr::getBlockContainingLocation ( int64_t  location) const
const Splay< mem_node * > & mem_hdr::getNodes ( ) const

Definition at line 425 of file stmem.cc.

References nodes.

Referenced by debugDump(), and testHdrVisit().

bool mem_hdr::hasContigousContentRange ( Range< int64_t > const &  range) const
void mem_hdr::internalAppend ( const char *  data,
int  len 
)
int64_t mem_hdr::lowestOffset ( ) const
void mem_hdr::makeAppendSpace ( )
private
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().

mem_node * mem_hdr::nodeToRecieve ( int64_t  offset)
private
size_t mem_hdr::size ( ) const

Definition at line 408 of file stmem.cc.

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

Referenced by StoreEntry::memoryCachable().

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

bool mem_hdr::unionNotEmpty ( StoreIOBuffer const &  candidate)
private
bool mem_hdr::unlink ( mem_node aNode)
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().

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

Member Data Documentation

int64_t mem_hdr::inmem_hi
private

Definition at line 59 of file stmem.h.

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

int mem_hdr::NodeCompare
static

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors