FTK change. The hash mask used by the block allocator is now based on the page size or allocation granularity of the platform.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@717 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -354,7 +354,20 @@ RCODE F_BlockAlloc::setup(
|
||||
// cell address to determine the correct hash SLABINFO
|
||||
// hash bucket
|
||||
|
||||
m_uiHashMask = ~((FLMUINT)(m_uiSlabSize - 1));
|
||||
#ifdef FLM_WIN
|
||||
{
|
||||
SYSTEM_INFO sysInfo;
|
||||
|
||||
GetSystemInfo( &sysInfo);
|
||||
m_uiHashMask = ~((FLMUINT)(sysInfo.dwAllocationGranularity - 1));
|
||||
}
|
||||
#elif defined( FLM_UNIX)
|
||||
m_uiHashMask = ~((FLMUINT)(sysconf( _SC_PAGESIZE) - 1));
|
||||
#else
|
||||
m_uiHashMask = FLM_MAX_UINT - 0xFFFF;
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
Exit:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user