summaryrefslogtreecommitdiff
path: root/rts/HeapStackCheck.cmm
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/HeapStackCheck.cmm
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/HeapStackCheck.cmm')
-rw-r--r--rts/HeapStackCheck.cmm4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm
index fc128e312f..1c1de089dc 100644
--- a/rts/HeapStackCheck.cmm
+++ b/rts/HeapStackCheck.cmm
@@ -100,8 +100,8 @@ stg_gc_noregs
CLOSE_NURSERY();
Capability_total_allocated(MyCapability()) =
Capability_total_allocated(MyCapability()) +
- BYTES_TO_WDS(bdescr_free(CurrentNursery) -
- bdescr_start(CurrentNursery));
+ %zx64(BYTES_TO_WDS(bdescr_free(CurrentNursery) -
+ bdescr_start(CurrentNursery)));
CurrentNursery = bdescr_link(CurrentNursery);
bdescr_free(CurrentNursery) = bdescr_start(CurrentNursery);
OPEN_NURSERY();