Alignment on Struct and Global Variable?

Discussion in 'C++' started by Bryan Parkoff, Apr 2, 2005.

  1. 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
    Bryan Parkoff, Apr 2, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan Parkoff
    Replies:
    2
    Views:
    6,473
  2. Chris Fogelklou
    Replies:
    36
    Views:
    1,348
    Chris Fogelklou
    Apr 20, 2004
  3. S.Tobias

    struct and union alignment

    S.Tobias, Sep 23, 2004, in forum: C Programming
    Replies:
    67
    Views:
    1,342
    Dave Thompson
    Oct 4, 2004
  4. PCHOME
    Replies:
    5
    Views:
    441
    Darius
    Apr 13, 2005
  5. Replies:
    18
    Views:
    7,036
    Karl Heinz Buchegger
    Jul 22, 2005
Loading...

Share This Page