[commit: ghc] master: Stable name comment wibbles (d1c2f29)

git at git.haskell.org git at git.haskell.org
Mon Sep 17 16:23:40 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d1c2f298870dbce29758243da54d2e29dd83246b/ghc

>---------------------------------------------------------------

commit d1c2f298870dbce29758243da54d2e29dd83246b
Author: David Feuer <david.feuer at gmail.com>
Date:   Mon Sep 17 16:46:05 2018 +0200

    Stable name comment wibbles
    
    Summary:
    Some comments in the `StableName` code still referred to
    stable pointer details. Fix that.
    
    Reviewers: bgamari, erikd, simonmar
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, carter
    
    Differential Revision: https://phabricator.haskell.org/D5152


>---------------------------------------------------------------

d1c2f298870dbce29758243da54d2e29dd83246b
 rts/StableName.c | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/rts/StableName.c b/rts/StableName.c
index abe7b69..757eb59 100644
--- a/rts/StableName.c
+++ b/rts/StableName.c
@@ -106,21 +106,6 @@ enlargeStableNameTable(void)
     initSnEntryFreeList(stable_name_table + old_SNT_size, old_SNT_size, NULL);
 }
 
-/* Note [Enlarging the stable pointer table]
- *
- * To enlarge the stable pointer table, we allocate a new table, copy the
- * existing entries, and then store the old version of the table in old_SPTs
- * until we free it during GC.  By not immediately freeing the old version
- * (or equivalently by not growing the table using realloc()), we ensure that
- * another thread simultaneously dereferencing a stable pointer using the old
- * version can safely access the table without causing a segfault (see Trac
- * #10296).
- *
- * Note that because the stable pointer table is doubled in size each time it is
- * enlarged, the total memory needed to store the old versions is always less
- * than that required to hold the current version.
- */
-
 
 /* -----------------------------------------------------------------------------
  * Freeing entries and tables
@@ -262,10 +247,10 @@ rememberOldStableNameAddresses(void)
 }
 
 /* -----------------------------------------------------------------------------
- * Thread the stable pointer table for compacting GC.
+ * Thread the stable name table for compacting GC.
  *
  * Here we must call the supplied evac function for each pointer into
- * the heap from the stable tables, because the compacting
+ * the heap from the stable name table, because the compacting
  * collector may move the object it points to.
  * -------------------------------------------------------------------------- */
 



More information about the ghc-commits mailing list