fix overflows

This commit is contained in:
Vítor Santos Costa
2011-12-22 11:42:26 +00:00
parent 551df1c70a
commit 1fde83d278
2 changed files with 14 additions and 9 deletions

View File

@@ -1361,9 +1361,13 @@ static int
growatomtable( USES_REGS1 )
{
AtomHashEntry *ntb;
UInt nsize = 4*AtomHashTableSize-1;
UInt diff = 3*AtomHashTableSize-1, nsize;
UInt start_growth_time = Yap_cputime(), growth_time;
int gc_verbose = Yap_is_gc_verbose();
if (diff > 4*1024*1024)
diff = 4*1024*1024+7919;
else
nsize = nsize+7919;
LOCK(LOCAL_SignalLock);
if (LOCAL_ActiveSignals == YAP_CDOVF_SIGNAL) {