ID:               49700
 Updated by:       f...@php.net
 Reported By:      indey...@php.net
 Status:           Open
 Bug Type:         Date/time related
 Operating System: Mac OS X 10.6.1
 PHP Version:      5.3SVN-2009-09-28 (SVN)
 New Comment:

Probably Mac OS only...

Couldn't reproduce with latest snap (php5.3-200910022030) on Linux x86
without running into a memory_limit of 512 MB with CLI


Previous Comments:
------------------------------------------------------------------------

[2009-09-28 17:25:28] indey...@php.net

Description:
------------
If garbage-collector is enabled and large quantity of DateTime objects
is created, php reports memory leaks

Reproduce code:
---------------
<?php

gc_enable();

$objs = array();
foreach (range(1,20000) as $i) {
    $objs[$i] = new DateTime();
}


Expected result:
----------------
DONE

Actual result:
--------------
DONE
[Mon Sep 28 21:23:24 2009]  Script:  '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(1137) : 
Freeing 0x106340068 (79 bytes), script=_mem_test.php
Last leak repeated 39993 times
[Mon Sep 28 21:23:24 2009]  Script:  '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(2088) : 
Freeing 0x106340118 (32 bytes), script=_mem_test.php
Last leak repeated 39993 times
[Mon Sep 28 21:23:24 2009]  Script:  '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(2091) : 
Freeing 0x106340198 (14 bytes), script=_mem_test.php
Last leak repeated 39993 times
[Mon Sep 28 21:23:24 2009]  Script:  '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(2078) : 
Freeing 0x106340208 (32 bytes), script=_mem_test.php
Last leak repeated 39993 times
[Mon Sep 28 21:23:24 2009]  Script:  '_mem_test.php'
/Users/indy/Documents/Sources/_mine/php5/ext/date/php_date.c(2084) : 
Freeing 0x106340338 (32 bytes), script=_mem_test.php
Last leak repeated 39993 times
=== Total 199970 memory leaks detected ===



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49700&edit=1

Reply via email to