X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FStorage.c;h=5919f7e997ebb3391cbdc0a2b24fec6b9ad98ea0;hb=39a991713f0705bf2599930e378178a1d6e2b5f9;hp=c903d3f90dff5a01a1c9ce011c52d6a54fb0d498;hpb=e4cc93bdfceaccbcae9b7cd2122284ac8cdff0b0;p=ghc-hetmet.git diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index c903d3f..5919f7e 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.c,v 1.26 2000/07/14 13:28:35 simonmar Exp $ + * $Id: Storage.c,v 1.27 2000/11/01 11:41:47 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -40,6 +40,8 @@ generation *g0; /* generation 0, for convenience */ generation *oldest_gen; /* oldest generation, for convenience */ step *g0s0; /* generation 0, step 0, for convenience */ +lnat total_allocated = 0; /* total memory allocated during run */ + /* * Storage manager mutex: protects all the above state from * simultaneous access by two STG threads. @@ -191,7 +193,7 @@ initStorage (void) void exitStorage (void) { - stat_exit(calcAllocated()); + stat_exit(calcAllocated()); } @@ -578,6 +580,7 @@ calcAllocated( void ) } #endif + total_allocated += allocated; return allocated; }