Doc #51392 [NEW]: Suggestion to simplify description of GC

From: Date: Thu, 25 Mar 2010 20:16:06 +0000
Subject: Doc #51392 [NEW]: Suggestion to simplify description of GC
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4109@lists.php.net to get a copy of this message
From: Operating system: Irrelevant PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Suggestion to simplify description of GC Description: ------------ http://www.php.net/manual/en/features.gc.collecting-cycles.php In the paragraph discussing the illustration of the garbage-collection algorithm there are three mentions of "white" zvals. The canonical exemplar is: 'If it finds that the refcount is zero, the zval is marked "white" (blue in the figure).' I know the reasoning behind the black/grey/white sequence, but saying "blue, I mean white, I mean yellooooww....." seems pointless unless one already has that background - and there's a link to the source for such people. The colouring is entirely arbitrary anyway (since it's really a matter of bit flipping and not actual hues); that paragraph would be slightly more straightforward if the extra layer of indirection was removed and simply referred to "blue" zvals throughout. Expected result: ---------------- In step B, the algorithm runs a depth-first search on all possible roots to decrease by one the refcounts of each zval it finds, making sure not to decrease a refcount on the same zval twice (by marking them as "grey"). In step C, the algorithm again runs a depth-first search from each root node, to check the refcount of each zval again. If it finds that the refcount is zero, the zval is marked "blue". If it's larger than zero, it reverts the decreasing of the refcount by one with a depth-first search from that point on, and they are marked "black" again. In the last step (D), the algorithm walks over the root buffer removing the zval roots from there, and meanwhile, checks which zvals have been marked "blue" in the previous step. Every zval marked as "blue" will be freed. -- Edit bug report at http://bugs.php.net/bug.php?id=51392&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51392&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51392&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51392&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51392&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51392&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51392&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51392&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51392&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51392&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51392&r=support Expected behavior: http://bugs.php.net/fix.php?id=51392&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51392&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51392&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51392&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51392&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51392&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51392&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51392&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51392&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51392&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51392&r=mysqlcfg

« previous php.doc.bugs (#4109) next »