+ words = payload_words + ((SIZEOF_StgArrWords + BA_MASK) & ~BA_MASK);
+
+ ("ptr" p) = foreign "C" allocatePinned(words) [];
+ TICK_ALLOC_PRIM(SIZEOF_StgArrWords,WDS(payload_words),0);
+
+ // This bumps p forwards so that the payload falls on an R2-byte boundary.
+ p = p + ((-p - SIZEOF_StgArrWords) & BA_MASK);
+
+ SET_HDR(p, stg_ARR_WORDS_info, W_[CCCS]);
+ StgArrWords_words(p) = payload_words;
+ RET_P(p);
+}
+
+newAlignedPinnedByteArrayzh_fast
+{
+ W_ words, payload_words, n, p, mask;
+
+ MAYBE_GC(NO_PTRS,newAlignedPinnedByteArrayzh_fast);
+ n = R1;
+
+ if (R2 > SIZEOF_W) {
+ mask = R2 - 1;
+ } else {
+ mask = 0;
+ }
+
+ payload_words = ROUNDUP_BYTES_TO_WDS(n);
+
+ // We want an <align>-byte aligned array. allocatePinned() gives us