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;
|
||||
|
||||
return
|
||||
UtlsStatMallocMem(sizeof(IHashTable)) +
|
||||
UtlsStatMallocMem(sizeof(void *)* table->iht_nBuckets);
|
||||
IHashAlignedSize(sizeof(IHashTable)) +
|
||||
IHashAlignedSize(sizeof(void *)* table->iht_nBuckets);
|
||||
}
|
||||
|
||||
/* hash for key fields that are pointers to strings */
|
||||
|
|
|
|||
|
|
@ -42,6 +42,16 @@
|
|||
#ifndef _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 */
|
||||
|
||||
typedef struct ihashtable
|
||||
|
|
|
|||
Loading…
Reference in New Issue