diff options
author | Ian Lynagh <igloo@earth.li> | 2010-06-19 23:52:14 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-06-19 23:52:14 +0000 |
commit | e7145eeefd01106cedb16a22866eb5160ccfb030 (patch) | |
tree | c0ce0155413fd6f9f6cd5e5ed9a7212d2dbc3adc | |
parent | ae75dfb80ccffcdb8d96d53508731214f7cb7305 (diff) | |
download | haskell-e7145eeefd01106cedb16a22866eb5160ccfb030.tar.gz |
SET_ARR_HDR's last argument is now a number of bytes, rather than words
This avoids unnecessary work and potential loss of information
-rw-r--r-- | includes/rts/storage/ClosureMacros.h | 4 | ||||
-rw-r--r-- | rts/Adjustor.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h index fa6a2a5448..aead2edd04 100644 --- a/includes/rts/storage/ClosureMacros.h +++ b/includes/rts/storage/ClosureMacros.h @@ -125,9 +125,9 @@ SET_PROF_HDR((StgClosure *)(c),ccs); \ } -#define SET_ARR_HDR(c,info,costCentreStack,n_words) \ +#define SET_ARR_HDR(c,info,costCentreStack,n_bytes) \ SET_HDR(c,info,costCentreStack); \ - (c)->bytes = n_words*sizeof(W_); + (c)->bytes = n_bytes; // Use when changing a closure from one kind to another #define OVERWRITE_INFO(c, new_info) \ diff --git a/rts/Adjustor.c b/rts/Adjustor.c index dd974e2090..382f74a435 100644 --- a/rts/Adjustor.c +++ b/rts/Adjustor.c @@ -225,7 +225,7 @@ stgAllocStable(size_t size_in_bytes, StgStablePtr *stable) /* allocate and fill it in */ arr = (StgArrWords *)allocate(total_size_in_words); - SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, data_size_in_words); + SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, size_in_bytes); /* obtain a stable ptr */ *stable = getStablePtr((StgPtr)arr); |