Unligned access problem with Alpha tru64

I

Ivan78

Hello All,
i have a problem with C language.
in any case when i try access to memory address the OS display a
following message:
unligned access
to resolve this problem i changed following instruction:

tpbyteSrcPos = pstSrcRec;
tpbyteDestPos = pstDestRec;
ENDIAN_RtxHostSrcToDest( (HOST_RTX_STR*)tpbyteSrcPos,
(HOST_RTX_STR*)tpbyy
teDestPos );


into:

tpbyteSrcPos = pstSrcRec;
tpbyteDestPos = pstDestRec;

memcpy(&TempSrcHostRtx, tpbyteSrcPos, sizeof(TempSrcHostRtx));
memcpy(&TempDestHostRtx, tpbyteDestPos,
sizeof(TempDestHostRtx));

ENDIAN_RtxHostSrcToDest( &TempSrcHostRtx, &TempDestHostRtx );

memcpy(tpbyteDestPos, &TempDestHostRtx,
sizeof(TempDestHostRtx));


somebody kown because i have an unaligned access??
somebody know why do i resolve this problem when i use memcpy function?

can I resolve this problem without changed first version of the code??

sorry for my English
thanks
Ivan
 
W

Walter Roberson

i have a problem with C language.
in any case when i try access to memory address the OS display a
following message:
unligned access
to resolve this problem i changed following instruction:
tpbyteSrcPos = pstSrcRec;
tpbyteDestPos = pstDestRec;
ENDIAN_RtxHostSrcToDest( (HOST_RTX_STR*)tpbyteSrcPos,
(HOST_RTX_STR*)tpbyyteDestPos );
somebody kown because i have an unaligned access??

Sorry, you do not show us the code for ENDIAN_RtxHostSrcToDest
and that appears to be specific to your program (I do not find
any reference to it via google.)

We will need the code for ENDIAN_RtxHostSrcToDest and we will
need to know what the type is of HOST_RTX_STR .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top