|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-03-17 22:56 UTC] ars
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 01:00:01 2025 UTC |
During several hash manipulations (e.g. mainly copy) the current PHP code approx. doubles the has table size during EACH copy. Such httpd becomes quickly unusable as the size grows to 100MB (in my case) and it starts swapping. Solution (=bugfix IMHO) is simple: -----------------------snip-snip-------------------------- --- php-cvs/hash.c-orig Sun Mar 15 09:50:43 1998 +++ php-cvs/hash.c Sun Mar 15 09:51:23 1998 @@ -64,7 +64,7 @@ uint i; for (i = 0; i < nNumPrimeNumbers; i++) { - if (nSize < PrimeNumbers[i]) { + if (nSize <= PrimeNumbers[i]) { nSize = PrimeNumbers[i]; ht->nHashSizeIndex = i; break; -----------------------snip-snip-------------------------- Thanks for source-available excellent language!