As mentioned above, ARR_WORDS
is used internally in the definition of ByteString
and Text
. Since this question is specifically about profiling heap usage, I want to add the following. ARR_WORDS
is specifically pinned data, which is data that the garbage collector cannot copy and move to new blocks in order to compactify the heap.
This can cause heap fragmentation (i.e., lots of memory allocated for the heap, but not many live objects on the heap). I found this Well-Typed blog post to be extremely helpful in understanding how ARR_WORDS
can affect the heap: https://www.well-typed.com/blog/2020/08/memory-fragmentation