Found and added another unused but missing subroutine from the bplane
implementation.
This commit is contained in:
parent
2d35bb52b3
commit
116feec2df
|
|
@ -276,8 +276,8 @@ int IHashStats2(IHashTable *table,
|
||||||
if(nEntries) *nEntries = table->iht_nEntries;
|
if(nEntries) *nEntries = table->iht_nEntries;
|
||||||
|
|
||||||
return
|
return
|
||||||
UtlsStatMallocMem(sizeof(IHashTable)) +
|
IHashAlignedSize(sizeof(IHashTable)) +
|
||||||
UtlsStatMallocMem(sizeof(void *)* table->iht_nBuckets);
|
IHashAlignedSize(sizeof(void *)* table->iht_nBuckets);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hash for key fields that are pointers to strings */
|
/* hash for key fields that are pointers to strings */
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,16 @@
|
||||||
#ifndef _IHASH_H
|
#ifndef _IHASH_H
|
||||||
#define _IHASH_H
|
#define _IHASH_H
|
||||||
|
|
||||||
|
/* returns total memory required for malloc of given size, for */
|
||||||
|
/* routine IHashStat2() only. */
|
||||||
|
|
||||||
|
static __inline__ int IHashAlignedSize(int size)
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
/* Expand size to be double-word (64 bit) aligned */
|
||||||
|
result = ((size + 7) / 8) * 8;
|
||||||
|
}
|
||||||
|
|
||||||
/* The IHashTable struct should not be manipulated directly by clients */
|
/* The IHashTable struct should not be manipulated directly by clients */
|
||||||
|
|
||||||
typedef struct ihashtable
|
typedef struct ihashtable
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue