features/gc.xml
9957fc259b7b920269ead2a0180969db5bf13433
...
...
@@ -45,7 +45,8 @@ $a = "new string";
45
45
<literal>new string</literal>. The "is_ref" bit is by default set to &false; because no
46
46
user-land reference has been created. The "refcount" is set to <literal>1</literal> as
47
47
there is only one symbol that makes use of this variable container. Note
48
-
that if "refcount" is <literal>1</literal>, "is_ref" is always &false;. If you have <link
48
+
that references (i.e. "is_ref" is &true;) with "refcount" <literal>1</literal>, are
49
+
treated as if they are not references (i.e. as "is_ref" was &false;). If you have <link
49
50
xlink:href="&url.xdebug;">Xdebug</link> installed, you can display this
50
51
information by calling <function>xdebug_debug_zval</function>.
51
52
</para>
...
...
@@ -404,7 +405,7 @@ a: (refcount=2, is_ref=1)=array (
404
405
When the garbage collector is turned on, the cycle-finding algorithm as
405
406
described above is executed whenever the root buffer runs full. The root
406
407
buffer has a fixed size of 10,000 possible roots (although you can alter
407
-
this by changing the <literal>GC_ROOT_BUFFER_MAX_ENTRIES</literal> constant in
408
+
this by changing the <constant>GC_THRESHOLD_DEFAULT</constant> constant in
408
409
<literal>Zend/zend_gc.c</literal> in the PHP source code, and re-compiling
409
410
PHP). When the garbage collector is turned off, the cycle-finding
410
411
algorithm will never run. However, possible roots will always be recorded
...
...
@@ -490,6 +491,7 @@ a: (refcount=2, is_ref=1)=array (
490
491
class Foo
491
492
{
492
493
public $var = '3.14159265359';
494
+
public $self;
493
495
}
494
496

495
497
$baseMemory = memory_get_usage();
...
...
@@ -552,6 +554,7 @@ for ( $i = 0; $i <= 100000; $i++ )
552
554
class Foo
553
555
{
554
556
public $var = '3.14159265359';
557
+
public $self;
555
558
}
556
559

557
560
for ( $i = 0; $i <= 1000000; $i++ )
558
561