summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b744498)
raw | patch | inline | side by side (parent: b744498)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 21 Aug 2017 11:53:36 +0000 (14:53 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 21 Aug 2017 11:57:11 +0000 (14:57 +0300) |
src/shared/hashtable.pas | patch | blob | history |
index 8b75d5475d551c0e2e1243e2ef0b58d91aabbb04..7dbbb260beb8d2b8dcdd44f2812da19992e04dad 100644 (file)
--- a/src/shared/hashtable.pas
+++ b/src/shared/hashtable.pas
begin
newsz := Length(mBuckets);
if (Length(mEntries) <> newsz) then raise Exception.Create('internal error in hash table (resize)');
- if (newsz <= 1024*1024*512) then newsz *= 2 else newsz += 1024*1024;
+ if (newsz <= 1024*1024*1024) then newsz *= 2 else raise Exception.Create('hash table too big');
{$IFDEF RBHASH_DEBUG_RESIZE}
writeln('resizing hash; used=', mBucketsUsed, '; total=', blen, '; maxload=', blen*LoadFactorPrc div 100, '; newsz=', newsz);
{$ENDIF}