50 if (!Len) Len = strlen(Val);
63 int XrdCmsKeyItem::numFree = 0;
64 int XrdCmsKeyItem::numHave = 0;
65 int XrdCmsKeyItem::numNull = 0;
83 TockTable[theTock] = kP;
93 Say.
Emsg(
"Key", ENOMEM,
"create key item");
103 static char *noKey = (
char *)
"";
107 if (Key.Val && Key.Val != noKey) {free(Key.Val); Key.Val = noKey;}
108 Key.Ref++; Key.Hash = 0;
112 Next = Free; Free =
this;
122 Key.TOD &=
static_cast<unsigned char>(TickMask);
123 Key.TODRef = TockTable[Key.TOD];
124 TockTable[Key.TOD] =
this;
140 DEBUG(
"old free " <<numFree <<
" + " <<minAlloc <<
" = " <<numHave+minAlloc);
146 while(i--) {kP->
Next = Free; Free = kP; kP++;}
182 myItem.
Key.
TODRef = TockTable[theTock]; TockTable[theTock] = 0;
184 if (nP->
Key.
TOD == theTock)
188 TockTable[nP->
Key.
TOD] = nP;
198 unsigned int theTock = theItem->
Key.
TOD & TickMask;
202 kP = TockTable[theTock];
203 while(kP && kP != theItem) {pP = kP; kP = kP->
Key.
TODRef;}
206 else TockTable[theTock] = kP->
Key.
TODRef;
static XrdCmsKeyItem * Unload(unsigned int theTock)
static XrdCmsKeyItem * Alloc(unsigned int theTock)
static void Stats(int &isAlloc, int &isFree, int &wasEmpty)
static uint32_t CRC32(const unsigned char *data, int count)
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)