structure padding

Discussion in 'C Programming' started by phoenix, Mar 11, 2005.

  1. phoenix

    phoenix Guest

    hello,

    in linux the word length is 4 bytes.
    so when memory is allocated for a structure.
    it allocates as a word.
    so as to remove tht extra memory allocated ,we can use some pragma
    directives to avoid tht.
    do anyone know tht pragma?

    bye.
     
    phoenix, Mar 11, 2005
    #1
    1. Advertising

  2. phoenix wrote:
    > in linux the word length is 4 bytes.
    > so when memory is allocated for a structure.
    > it allocates as a word.
    > so as to remove tht extra memory allocated ,we can use
    > some pragma
    > directives to avoid tht.
    > do anyone know tht pragma?


    The C language standards do not define a specific pragma for
    that purpose. It is implementation specific, therefore off-
    topic in comp.lang.c.

    [CLC is not a general purpose C group, rather it deals
    specifically with C as defined by the C language standards.]

    Please consult a linux developers group.

    --
    Peter
     
    Peter Nilsson, Mar 11, 2005
    #2
    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. Amarendra

    Structure padding.

    Amarendra, Jun 21, 2004, in forum: C Programming
    Replies:
    13
    Views:
    9,615
    Ralmin
    Jun 22, 2004
  2. Replies:
    6
    Views:
    481
    Flash Gordon
    May 18, 2005
  3. Stephen Mayes

    structure padding

    Stephen Mayes, May 20, 2005, in forum: C Programming
    Replies:
    5
    Views:
    459
    Dave Thompson
    May 31, 2005
  4. ramu

    structure padding

    ramu, Feb 2, 2006, in forum: C Programming
    Replies:
    28
    Views:
    926
    Jordan Abel
    Feb 5, 2006
  5. Kislay

    Size of a structure : Structure Padding

    Kislay, Oct 1, 2007, in forum: C Programming
    Replies:
    15
    Views:
    986
    clinuxpro
    Jul 13, 2011
Loading...

Share This Page