Collaboration diagram for cbdata:

Public Member Functions

 cbdata ()
 
 ~cbdata ()
 
void check (int) const
 

Public Attributes

int valid
 
int32_t locks
 
cbdata_type type
 
long cookie
 
void * data
 

Static Public Attributes

static const long Cookie
 

Private Member Functions

 MEMPROXY_CLASS (cbdata)
 

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 60 of file cbdata.cc.

Constructor & Destructor Documentation

cbdata::cbdata ( )
inline
Todo:
examine making cbdata templated on this - so we get type safe access to data - RBC 20030902

Definition at line 81 of file cbdata.cc.

cbdata::~cbdata ( )

Definition at line 155 of file cbdata.cc.

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

Member Function Documentation

void cbdata::check ( int  ) const
inline

Definition at line 114 of file cbdata.cc.

References assert, cookie, and Cookie.

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

cbdata::MEMPROXY_CLASS ( cbdata  )
private

Member Data Documentation

long cbdata::cookie

Definition at line 113 of file cbdata.cc.

Referenced by cbdataInternalAlloc(), and check().

const long cbdata::Cookie
static

Definition at line 115 of file cbdata.cc.

Referenced by cbdataInternalAlloc(), and check().

void* cbdata::data

Definition at line 123 of file cbdata.cc.

Referenced by cbdataInternalAlloc(), cbdataRealFree(), Ssl::HandleGeneratorReply(), and ~cbdata().

int32_t cbdata::locks
cbdata_type cbdata::type

Definition at line 96 of file cbdata.cc.

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

int cbdata::valid

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors