
24 Oct
2010
24 Oct
'10
5:02 a.m.
Hi, I noticed that indexWordArray# only allows for aligned reads (by forcing the offset to be in words, rather than in bytes.) Is it possible to perform unaligned reads on a ByteArray# e.g. going via Addr#? There's the byteArrayContent# primitive but I don't know how to force the ByteArray# to stay pinned in memory while performing my reads. The ByteArray# is not guaranteed to be pinned in my case. A somewhat related question: are there any defines (in e.g. MachDeps.h) that I could use to detect whether the machine supports unaligned reads? For example, if I knew the processor architecture, I could figure that out. Johan