Commit 9fdce342 authored by Simon Marlow's avatar Simon Marlow

newAlignedPinnedByteArray#: avoid allocating an extra word sometimes

parent 907fa8af
......@@ -109,6 +109,11 @@ stg_newAlignedPinnedByteArrayzh
n = R1;
alignment = R2;
/* we always supply at least word-aligned memory, so there's no
need to allow extra space for alignment if the requirement is less
than a word. This also prevents mischief with alignment == 0. */
if (alignment <= SIZEOF_W) { alignment = 1; }
bytes = n;
/* payload_words is what we will tell the profiler we had to allocate */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment