Collaboration diagram for cbdata:

Public Member Functions

void * operator new (size_t byteCount)
 
void operator delete (void *address)
 
 cbdata ()
 
 ~cbdata ()
 
void check (int) const
 

Static Public Member Functions

static int UseCount ()
 
static cbdataFromUserData (const void *)
 

Public Attributes

int valid
 
int32_t locks
 
cbdata_type type
 
long cookie
 
void * data
 

Static Public Attributes

static const long Cookie
 

Static Private Member Functions

static Mem::AllocatorProxyPool ()
 

Detailed Description

Manage a set of registered callback data pointers. One of the easiest ways to make Squid coredump is to issue a callback to for some data structure which has previously been freed. With this class, we register (add) callback data pointers, lock them just before registering the callback function, validate them before issuing the callback, and then free them when finished.

Definition at line 59 of file cbdata.cc.

Constructor & Destructor Documentation

◆ cbdata()

cbdata::cbdata ( )
inline

Definition at line 80 of file cbdata.cc.

◆ ~cbdata()

cbdata::~cbdata ( )

Definition at line 145 of file cbdata.cc.

References cbdata_index, data, MemAllocator::freeOne(), CBDataIndex::pool, and type.

Member Function Documentation

◆ check()

void cbdata::check ( int  ) const
inline

Definition at line 115 of file cbdata.cc.

References assert, cookie, and Cookie.

◆ FromUserData()

cbdata * cbdata::FromUserData ( const void *  p)
static

Definition at line 165 of file cbdata.cc.

References cbdata_htable, and data.

Referenced by cbdataInternalFree(), cbdataInternalLock(), cbdataInternalUnlock(), and cbdataReferenceValid().

◆ operator delete()

void cbdata::operator delete ( void *  address)
inline

Definition at line 70 of file cbdata.cc.

◆ operator new()

void* cbdata::operator new ( size_t  byteCount)
inline

Definition at line 70 of file cbdata.cc.

◆ Pool()

static Mem::AllocatorProxy& cbdata::Pool ( )
inlinestaticprivate

Definition at line 70 of file cbdata.cc.

◆ UseCount()

static int cbdata::UseCount ( )
inlinestatic

Definition at line 70 of file cbdata.cc.

Member Data Documentation

◆ cookie

long cbdata::cookie

Definition at line 114 of file cbdata.cc.

Referenced by cbdataInternalAlloc(), and check().

◆ Cookie

const long cbdata::Cookie
static

Definition at line 116 of file cbdata.cc.

Referenced by cbdataInternalAlloc(), and check().

◆ data

void* cbdata::data

◆ locks

int32_t cbdata::locks

Definition at line 96 of file cbdata.cc.

Referenced by cbdataInternalAlloc().

◆ type

cbdata_type cbdata::type

Definition at line 97 of file cbdata.cc.

Referenced by ~cbdata(), and cbdataInternalAlloc().

◆ valid

int cbdata::valid

Definition at line 95 of file cbdata.cc.

Referenced by cbdataInternalAlloc().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors