[commit: ghc] master: Just comments & reformatting (0712f55)
git at git.haskell.org
git at git.haskell.org
Tue Apr 26 14:58:11 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0712f55628f22c61b0c7cedf71588d14156e6635/ghc
>---------------------------------------------------------------
commit 0712f55628f22c61b0c7cedf71588d14156e6635
Author: Simon Marlow <marlowsd at gmail.com>
Date: Sun Apr 24 21:14:43 2016 +0100
Just comments & reformatting
>---------------------------------------------------------------
0712f55628f22c61b0c7cedf71588d14156e6635
rts/sm/Storage.h | 56 +++++++++++++++++++++-----------------------------------
1 file changed, 21 insertions(+), 35 deletions(-)
diff --git a/rts/sm/Storage.h b/rts/sm/Storage.h
index 3dd3ec0..6c6daab 100644
--- a/rts/sm/Storage.h
+++ b/rts/sm/Storage.h
@@ -2,7 +2,7 @@
*
* (c) The GHC Team, 1998-2009
*
- * External Storage Manger Interface
+ * Storage Manger Interface
*
* ---------------------------------------------------------------------------*/
@@ -26,34 +26,20 @@ void freeStorage(rtsBool free_heap);
void storageAddCapabilities (nat from, nat to);
/* -----------------------------------------------------------------------------
- Storage manager state
+ Should we GC?
-------------------------------------------------------------------------- */
-INLINE_HEADER rtsBool
-doYouWantToGC( Capability *cap )
+INLINE_HEADER
+rtsBool doYouWantToGC(Capability *cap)
{
- return (cap->r.rCurrentNursery->link == NULL ||
- g0->n_new_large_words >= large_alloc_lim);
+ return (cap->r.rCurrentNursery->link == NULL ||
+ g0->n_new_large_words >= large_alloc_lim);
}
-/* for splitting blocks groups in two */
-bdescr * splitLargeBlock (bdescr *bd, W_ blocks);
-
/* -----------------------------------------------------------------------------
- Generational garbage collection support
-
- updateWithIndirection(p1,p2) Updates the object at p1 with an
- indirection pointing to p2. This is
- normally called for objects in an old
- generation (>0) when they are updated.
-
- updateWithPermIndirection(p1,p2) As above but uses a permanent indir.
-
+ The storage manager mutex
-------------------------------------------------------------------------- */
-/*
- * Storage manager mutex
- */
#if defined(THREADED_RTS)
extern Mutex sm_mutex;
#endif
@@ -82,12 +68,12 @@ void dirty_TVAR(Capability *cap, StgTVar *p);
extern nursery *nurseries;
extern nat n_nurseries;
-void resetNurseries ( void );
-void clearNursery ( Capability *cap );
-void resizeNurseries ( W_ blocks );
-void resizeNurseriesFixed ( void );
-W_ countNurseryBlocks ( void );
-rtsBool getNewNursery ( Capability *cap );
+void resetNurseries (void);
+void clearNursery (Capability *cap);
+void resizeNurseries (StgWord blocks);
+void resizeNurseriesFixed (void);
+StgWord countNurseryBlocks (void);
+rtsBool getNewNursery (Capability *cap);
/* -----------------------------------------------------------------------------
Allocation accounting
@@ -114,15 +100,15 @@ StgWord calcTotalAllocated (void);
Stats 'n' DEBUG stuff
-------------------------------------------------------------------------- */
-W_ countLargeAllocated (void);
-W_ countOccupied (bdescr *bd);
-W_ calcNeeded (rtsBool force_major, W_ *blocks_needed);
+StgWord countLargeAllocated (void);
+StgWord countOccupied (bdescr *bd);
+StgWord calcNeeded (rtsBool force_major, StgWord *blocks_needed);
-W_ gcThreadLiveWords (nat i, nat g);
-W_ gcThreadLiveBlocks (nat i, nat g);
+StgWord gcThreadLiveWords (nat i, nat g);
+StgWord gcThreadLiveBlocks (nat i, nat g);
-W_ genLiveWords (generation *gen);
-W_ genLiveBlocks (generation *gen);
+StgWord genLiveWords (generation *gen);
+StgWord genLiveBlocks (generation *gen);
/* ----------------------------------------------------------------------------
Storage manager internal APIs and globals
@@ -130,7 +116,7 @@ W_ genLiveBlocks (generation *gen);
extern bdescr *exec_block;
-void move_STACK (StgStack *src, StgStack *dest);
+void move_STACK (StgStack *src, StgStack *dest);
/* -----------------------------------------------------------------------------
Note [STATIC_LINK fields]
More information about the ghc-commits
mailing list