summaryrefslogtreecommitdiff
path: root/includes/rts/storage/Closures.h
diff options
context:
space:
mode:
authorArash Rouhani <rarash@student.chalmers.se>2013-11-21 14:17:45 +0100
committerAustin Seipp <austin@well-typed.com>2013-11-22 08:04:53 -0600
commitac5ff6422fb9e143c38e6cdcf16280de200cb880 (patch)
tree43185f582626b736886f9a62b5a5f5298225189f /includes/rts/storage/Closures.h
parent1bffa2b2e7b7d1a829dff44256a5d1da3f2aef88 (diff)
downloadhaskell-ac5ff6422fb9e143c38e6cdcf16280de200cb880.tar.gz
Comment on StgArrWords vs StgArrBytes
See #8552 Signed-off-by: Arash Rouhani <rarash@student.chalmers.se> Reviewed-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'includes/rts/storage/Closures.h')
-rw-r--r--includes/rts/storage/Closures.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index 09e702149a..27041287b9 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -135,11 +135,18 @@ typedef struct StgBlockingQueue_ {
struct MessageBlackHole_ *queue;
} StgBlockingQueue;
+/* This struct should be called StgArrBytes rather than StgArrWords.
+ *
+ * One might be very tempted to store the number of words in the bytes field,
+ * but the garbage collector will erase your data then.
+ *
+ * It's name is for historical reasons, see #3800
+ */
typedef struct {
StgHeader header;
StgWord bytes;
StgWord payload[FLEXIBLE_ARRAY];
-} StgArrWords;
+} StgArrWords; // TODO: s/StgArrWords/StgArrBytes (#8552)
typedef struct {
StgHeader header;