9#ifndef SQUID_SRC_SBUF_MEMBLOB_H
10#define SQUID_SRC_SBUF_MEMBLOB_H
12#define MEMBLOB_DEBUGSECTION 24
16#include "mem/forward.h"
23 std::ostream&
dump(std::ostream& os)
const;
106 std::ostream &
dump(std::ostream &os)
const;
#define RefCountable
The locking interface for use on Reference-Counted classes.
Various MemBlob class-wide statistics.
uint64_t live
number of MemBlob instances currently alive
uint64_t liveBytes
the total size of currently allocated storage
uint64_t alloc
number of MemBlob instances created so far
uint64_t append
number of MemBlob::append() calls
MemBlobStats & operator+=(const MemBlobStats &)
std::ostream & dump(std::ostream &os) const
dumps class-wide statistics
size_type spaceSize() const
the number unused bytes at the end of the allocated blob
bool isAppendOffset(const size_type off) const
whether the offset points to the end of the used area
void syncSize(const size_type n)
bool willFit(const size_type n) const
whether n more bytes can be appended
value_type * mem
raw allocated memory block
size_type size
maximum allocated memory in use by callers
static const MemBlobStats & GetStats()
obtain a const view of class-wide statistics
bool canAppend(const size_type off, const size_type n) const
void memAlloc(const size_type memSize)
void appended(const size_type n)
const InstanceId< MemBlob > id
blob identifier
RefCount< MemBlob > Pointer
MemBlob & operator=(const MemBlob &)
void append(const_pointer source, const size_type n)
std::ostream & dump(std::ostream &os) const
dump debugging information
void consume(const size_type n)
size_type capacity
size of the raw allocated memory block
const value_type * const_pointer