Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Alignment on Struct and Global Variable?

Reply
Thread Tools

Alignment on Struct and Global Variable?

 
 
Bryan Parkoff
Guest
Posts: n/a
 
      04-02-2005
I know that after optimization is done under C++ compiler's option, it
always align byte and word into dword inside struct. What about global
variable in this slope?
If global variable has done with alignment by optimization, it would be
great when I write global variable inside namespace group. It has no impact
with the performance between global variable and struct, but they are always
the same.

Bryan Parkoff


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can *common* struct-members of 2 different struct-types, that are thesame for the first common members, be accessed via pointer cast to either struct-type? John Reye C Programming 28 05-08-2012 12:24 AM
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 1 10-25-2006 06:50 PM
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 0 10-25-2006 01:04 PM
Use Global Variable or Global Struct??? Bryan Parkoff C++ 2 11-27-2004 02:46 AM
struct my_struct *p = (struct my_struct *)malloc(sizeof(struct my_struct)); Chris Fogelklou C Programming 36 04-20-2004 08:27 AM



Advertisments