|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-09-03 10:47 UTC] jani@php.net
[2007-09-03 14:25 UTC] nlopess@php.net
[2007-11-01 00:48 UTC] stas@php.net
[2012-05-23 00:19 UTC] azrzrqlilylrw at gmail dot com
[2012-05-23 00:19 UTC] azrzrqlilylrw at gmail dot com
-: thomas.hebinck@digionline.de
+: azrzrqlilylrw at gmail dot com
-Package: Math related
+Package: *General Issues
[2012-05-24 11:09 UTC] pvqmhulilymtw at gmail dot com
-: azrzrqlilylrw@gmail.com
+: pvqmhulilymtw at gmail dot com
[2012-05-24 11:09 UTC] pvqmhulilymtw at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 16:00:01 2025 UTC |
Description: ------------ Various GMP Functions eat memory, when not called directly with integers or strings instead of gmp resources. Reproduce code: --------------- $a='1234'; for($i=0;$i<200000;$i++) { $c=gmp_add(gmp_init($a),gmp_init($a)); } echo memory_get_usage() . "?\n"; for($i=0;$i<200000;$i++) { $c=gmp_add($a,$a); } echo memory_get_usage() . "?\n"; Expected result: ---------------- Both memory_get_usage() should show nearly the same values. Actual result: -------------- 1732656? // ~ 2 MB 43809696? // ~ 43 MB