| Date: 1/24/97 12:08 PM
Barbara,
Here is information on the compiler flags which you requested.
The -migrate flag to the cc command will use the newer DEC C compiler as opposed
to the default compiler (DEC OSF/1 C). Why don't use use this compiler. It's
the standard compiler on Digital UNIX 4.0 which make a transition to it easier.
Using -migrate will enable you to use the #pragma nomember_alignment around
structures which you don't want aligned on natural boundries since this is what
the compiler defaults to. For pointers to unaligned structures, surround the
pointer with the following code to make it align.
#pragma member_alignment save
#pragma nomember_alignment
typedef struct {int i;} unaligned_int;
#pragma member_alignment restore
Could an unaligned structure be an issue for you?
You can use the -xtaso flag where your code is dependent on 32-bit pointers
(i.e., you assumes that int, long, and pointers are 32-bits). Inserting
#pragma pointer_size where 32-bit pointers are being used will workaround
unaligned access errors.
The -misalign flag deals with code generation for arbitrarily aligned addresses.
You probably don't want this since it will affect your entire application. Same
with the -assume aligned_objects flag (-migrate required here). It causes the
compiler to make guesses about whether a pointer is aligned. It should only be
used when you know you have unaligned data since it will cause the compiler to
generate inefficient code.
To confirm that the unaligned access errors are coming from the Virtual Memory
manager please build a symbolic version of your application. Then find the
offending code by going into dbx and doing a "stopi at <pcaddr>", then run, then
do a "where" to see the code where this is occurring. Then send me this
information. I believe there are more detailed instructions on how to do this
in the FAQ I sent you earlier this week.
Also, feel free to send me a reproducer if none of these suggestions help with
the memory attach code which is giving you trouble and I'll be happy to escalate
it if necessary.
Thanks.
Pat Bryant
|