summaryrefslogtreecommitdiffstats
path: root/src/opt
diff options
context:
space:
mode:
authorBruno Schmitt <bruno@oschmitt.com>2017-05-26 16:56:56 +0200
committerBruno Schmitt <bruno@oschmitt.com>2017-05-26 16:56:56 +0200
commite74f05d71ece1f137b159518c96bda004648a1d9 (patch)
tree28754ceec3b8360c76a96ac01a5c0ffae522b361 /src/opt
parent867c90d1141e272776519b4bfaf103cd5e237090 (diff)
downloadabc-e74f05d71ece1f137b159518c96bda004648a1d9.tar.gz
abc-e74f05d71ece1f137b159518c96bda004648a1d9.tar.bz2
abc-e74f05d71ece1f137b159518c96bda004648a1d9.zip
Small fix for bins growth in sub-cube hashtable.
Diffstat (limited to 'src/opt')
-rw-r--r--src/opt/fxch/FxchSCHashTable.c3
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 );
}