remove global 'total_allocated', seems to be the same as 'GC_tot_alloc'
authorSimon Marlow <marlowsd@gmail.com>
Mon, 7 Dec 2009 11:53:59 +0000 (11:53 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 7 Dec 2009 11:53:59 +0000 (11:53 +0000)
rts/Stats.c
rts/sm/Storage.c
rts/sm/Storage.h

index b1061de..20de32a 100644 (file)
@@ -813,7 +813,7 @@ statDescribeGens(void)
    -------------------------------------------------------------------------- */
 
 extern HsInt64 getAllocations( void ) 
-{ return (HsInt64)total_allocated * sizeof(W_); }
+{ return (HsInt64)GC_tot_alloc * sizeof(W_); }
 
 /* -----------------------------------------------------------------------------
    Dumping stuff in the stats file, or via the debug message interface
index 4498bda..781234a 100644 (file)
@@ -49,8 +49,6 @@ generation *generations = NULL;       /* all the generations */
 generation *g0         = NULL; /* generation 0, for convenience */
 generation *oldest_gen  = NULL; /* oldest generation, for convenience */
 
-ullong total_allocated = 0;    /* total memory allocated during run */
-
 nursery *nurseries = NULL;     /* array of nurseries, size == n_capabilities */
 
 #ifdef THREADED_RTS
@@ -789,7 +787,6 @@ calcAllocated( void )
 
   allocated += g0->n_new_large_blocks * BLOCK_SIZE_W;
 
-  total_allocated += allocated;
   return allocated;
 }  
 
index 6dbccd8..f8532e0 100644 (file)
@@ -132,8 +132,6 @@ lnat     countNurseryBlocks   ( void );
    Stats 'n' DEBUG stuff
    -------------------------------------------------------------------------- */
 
-extern ullong total_allocated;
-
 lnat    calcAllocated  (void);
 lnat    calcLiveBlocks (void);
 lnat    calcLiveWords  (void);