Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiler/Linker yield different class sizes

Status
Not open for further replies.

LMS

Programmer
Mar 14, 2000
2
US
I have 100K SLOC app that compiles/links fine on Dec Alpha. When I compile/link the code on Intel platform, I find that a few global class objects are larger in the compilation (per watch window "sizeof") than what the link load map shows. Now the difference I infer to be due to alignment padding. Nonetheless, in one case the compiler generates object with 40 byte size, and load map shows 36 bytes! I haven't produced this in a small app yet. The compilation settings have 8 byte alignment. Any ideas on how to force linker to give 8 byte doubleword alignment as default for Intel? (Alpha Dev Studio uses double word boundaries for ALL globals.) Appreciate your experiences learned...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top