diff options
author | Simon Marlow <marlowsd@gmail.com> | 2018-03-08 08:54:01 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2018-03-09 09:27:17 +0000 |
commit | df2ea10655984234924ad9f2c237289ab8f4baa6 (patch) | |
tree | 4589630296d8c17dae1c8197a4f3176594be2f82 /rts | |
parent | a25b763fa9e09d3bf7c82fef1eaed89a7afc54f7 (diff) | |
download | haskell-df2ea10655984234924ad9f2c237289ab8f4baa6.tar.gz |
Compacted arrays are pinned for isByteArrayPinned#
Test Plan: New unit test
Reviewers: andrewthad, niteria, bgamari, erikd
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14900
Differential Revision: https://phabricator.haskell.org/D4485
Diffstat (limited to 'rts')
-rw-r--r-- | rts/PrimOps.cmm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 6d57fd889d..67a238488c 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -160,8 +160,9 @@ stg_isByteArrayPinnedzh ( gcptr ba ) // Pinned byte arrays live in blocks with the BF_PINNED flag set. // We also consider BF_LARGE objects to be immovable. See #13894. // See the comment in Storage.c:allocatePinned. + // We also consider BF_COMPACT objects to be immovable. See #14900. flags = TO_W_(bdescr_flags(bd)); - return (flags & (BF_PINNED | BF_LARGE) != 0); + return (flags & (BF_PINNED | BF_LARGE | BF_COMPACT) != 0); } stg_isMutableByteArrayPinnedzh ( gcptr mba ) |