Collaboration diagram for cbdata:

Public Member Functions

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

Static Public Member Functions

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

Private Member Functions


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 37 of file

Constructor & Destructor Documentation

◆ cbdata()

cbdata::cbdata ( )

Definition at line 54 of file

◆ ~cbdata()

cbdata::~cbdata ( )

Definition at line 96 of file

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

Member Function Documentation

◆ check()

void cbdata::check ( int  ) const

Definition at line 71 of file

References assert, cookie, and Cookie.

◆ FromUserData()

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

Definition at line 107 of file

References cbdata_htable, and data.

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


cbdata::MEMPROXY_CLASS ( cbdata  )

Member Data Documentation

◆ cookie

long cbdata::cookie

Definition at line 70 of file

Referenced by cbdataInternalAlloc(), and check().

◆ Cookie

const long cbdata::Cookie

Definition at line 72 of file

Referenced by cbdataInternalAlloc(), and check().

◆ data

void* cbdata::data

◆ locks

int32_t cbdata::locks

Definition at line 66 of file

Referenced by cbdataInternalAlloc().

◆ type

cbdata_type cbdata::type

Definition at line 67 of file

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

◆ valid

int cbdata::valid

Definition at line 65 of file

Referenced by cbdataInternalAlloc().

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






Web Site Translations