Permit `ARR_WORDS` closures outside `HEAP_ALLOCED` space
This is a rebase of !2561 on master.
Thank you for your contribution to GHC!
Please take a few moments to verify that your commits fulfill the following:
-
are either individually buildable or squashed -
have commit messages which describe what they do (referring to [Notes][notes] and tickets using #NNNN
syntax when appropriate) -
have added source comments describing your change. For larger changes you likely should add a [Note][notes] and cross-reference it from the relevant places. -
add a testcase to the testsuite.
Motivation for this change
We would like to be able to have byte arrays that live off the garbage collector managed heap. Therefore we allow ARR_WORDS
closure outside the HEAP_ALLOCED
space. We also need to be able to write the ByteArray#
header in front of the data, in order to write this C struct we added the placeByteArray#
primop.
Edited by Reinier Maas