Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

C++ compiler option -misalign

807575Jul 7 2000
Can someone help me understand the performance implication of this option? Specifically, I would like to know if "very conservative loads and stores" are used for ALL data accesses in the program, not just misaligned data accesses.

The following is quoted from the compiler's user's guide:

-misalign

SPARC: Permits misaligned data, which would otherwise generate an error, in memory. This is shown in the following
code:

char b[100];
int f(int * ar) {
return *(int *) (b +2) + *ar;
}

Very conservative loads and stores must be used for the data, that is, one byte at a time. Using this option can cause
significant degradation in performance when you run the program.

Warnings

If possible, do not link aligned and misaligned parts of the program

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 4 2000
Added on Jul 7 2000
0 comments
55 views