summaryrefslogtreecommitdiff
path: root/rts/sm/Storage.c
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-06-22 17:51:06 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-25 03:54:55 -0400
commitd3c2d59bafe253dd7e4966a46564fb16acb1af5c (patch)
treeda757ae9fd5a45674915c1e111990b45d839ede7 /rts/sm/Storage.c
parenta788d4d17ad332dbfbe08e6822c52ae0de6ef496 (diff)
downloadhaskell-d3c2d59bafe253dd7e4966a46564fb16acb1af5c.tar.gz
RTS: avoid overflow on 32-bit arch (#18375)
We're now correctly computing allocated bytes on 32-bit arch, so we get huge increases. Metric Increase: haddock.Cabal haddock.base haddock.compiler space_leak_001
Diffstat (limited to 'rts/sm/Storage.c')
-rw-r--r--rts/sm/Storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index b47afaf7df..96bc133d02 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1455,10 +1455,10 @@ dirty_MVAR(StgRegTable *reg, StgClosure *p, StgClosure *old_val)
// program. Also emits events reporting the per-cap allocation
// totals.
//
-StgWord
+uint64_t
calcTotalAllocated (void)
{
- W_ tot_alloc = 0;
+ uint64_t tot_alloc = 0;
W_ n;
for (n = 0; n < n_capabilities; n++) {