diff options
author | Bruno Schmitt <bruno@oschmitt.com> | 2017-05-26 16:56:56 +0200 |
---|---|---|
committer | Bruno Schmitt <bruno@oschmitt.com> | 2017-05-26 16:56:56 +0200 |
commit | e74f05d71ece1f137b159518c96bda004648a1d9 (patch) | |
tree | 28754ceec3b8360c76a96ac01a5c0ffae522b361 | |
parent | 867c90d1141e272776519b4bfaf103cd5e237090 (diff) | |
download | abc-e74f05d71ece1f137b159518c96bda004648a1d9.tar.gz abc-e74f05d71ece1f137b159518c96bda004648a1d9.tar.bz2 abc-e74f05d71ece1f137b159518c96bda004648a1d9.zip |
Small fix for bins growth in sub-cube hashtable.
-rw-r--r-- | src/opt/fxch/FxchSCHashTable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opt/fxch/FxchSCHashTable.c b/src/opt/fxch/FxchSCHashTable.c index f854a1fa..80753677 100644 --- a/src/opt/fxch/FxchSCHashTable.c +++ b/src/opt/fxch/FxchSCHashTable.c @@ -195,7 +195,8 @@ int Fxch_SCHashTableInsert( Fxch_SCHashTable_t* pSCHashTable, } else if ( pBin->Size == pBin->Cap ) { - pBin->Cap = 2 * pBin->Size; + assert(pBin->Cap <= 0xAAAA); + pBin->Cap = ( pBin->Cap >> 1 ) * 3; pBin->vSCData = ABC_REALLOC( Fxch_SubCube_t, pBin->vSCData, pBin->Cap ); } |