section "Byte Arrays"
{Operations on {\tt ByteArray\#}. A {\tt ByteArray\#} is a just a region of
raw memory in the garbage-collected heap, which is not
- scanned for pointers. It carries its own size (in bytes,
- rounded up to the nearest multiple of a word). There are
+ scanned for pointers. It carries its own size (in bytes).
+ There are
three sets of operations for accessing byte array contents:
index for reading from immutable byte arrays, and read/write
for mutable byte arrays. Each set contains operations for a
primop SizeofByteArrayOp "sizeofByteArray#" GenPrimOp
ByteArray# -> Int#
- {Return the size of the array in bytes, rounded up to the nearest multiple
- of a word.}
+ {Return the size of the array in bytes.}
primop SizeofMutableByteArrayOp "sizeofMutableByteArray#" GenPrimOp
MutableByteArray# s -> Int#
- {Return the size of the array in bytes, rounded up to the nearest multiple
- of a word.}
+ {Return the size of the array in bytes.}
primop IndexByteArrayOp_Char "indexCharArray#" GenPrimOp
ByteArray# -> Int# -> Char#