com php-src: Fix memory usage test: Zend/tests/bug43450.phpt
| From: | Nikita Popov | Date: | Fri, 15 Aug 2014 15:44:15 +0000 |
| Subject: | com php-src: Fix memory usage test: Zend/tests/bug43450.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-80870@lists.php.net to get a copy of this message | ||
Commit: 919cb32f720561dc5f1c8853173ed2a9970820b5
Author: Nikita Popov <nikic@php.net> Fri, 15 Aug 2014 17:44:15 +0200
Parents: 471f13b75ecdb4353d0f0698a2b1013e9973b64e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=919cb32f720561dc5f1c8853173ed2a9970820b5
Log:
Fix memory usage test
Can't use peak memory usage because memory usage during compilation
is now larger
Changed paths:
M Zend/tests/bug43450.phpt
Diff:
diff --git a/Zend/tests/bug43450.phpt b/Zend/tests/bug43450.phpt
index a94eba3..f0cd4f7 100644
--- a/Zend/tests/bug43450.phpt
+++ b/Zend/tests/bug43450.phpt
@@ -18,15 +18,15 @@ class Foo
$num_repeats = 100000;
-$start = (memory_get_usage() / 1024) + 16;
+$start = memory_get_usage() / 1024;
for ($i=1;$i<$num_repeats;$i++)
{
$foo = new Foo();
md5($foo);
}
-$end = memory_get_peak_usage() / 1024;
+$end = memory_get_usage() / 1024;
-if ($start < $end) {
+if ($start + 16 < $end) {
echo 'FAIL';
} else {
echo 'PASS';