Size of char on a 64 bit machine

From: aruna (arunal2001_at_yahoo.co.in)
Date: 04/28/04


Date: 28 Apr 2004 08:53:56 -0700

How is a character stored in a word aligned machine? Assuming on 64bit
machine, 1 byte is reserved for a char, is it the case that only 1
byte is used to store the character and the rest 7 bytes are wasted,
or my assumption is wrong? If my assumption is right, what are the
performance issues in retrieving value of a character variable over
other data types like integer, double or float.



Relevant Pages

  • Re: gcc program core dump
    ... >Enter number of weeks rent due:2 ... this function (up in your first float statement) did not describe the ... character and press the enter key. ... tv_type is a char which, by definition, has room for only on ...
    (comp.unix.solaris)
  • Re: reading csv files
    ... > character, returning no characters to your program. ... char, long, float, float, float, long ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Size of char on a 64 bit machine
    ... > How is a character stored in a word aligned machine? ... char requires only 1-byte alignment, but a 32-bit int requires 4-byte ... > byte is used to store the character and the rest 7 bytes are wasted, ... multiple variables in each cache line because it reduces cache misses. ...
    (comp.lang.c)
  • Re: Size of char on a 64 bit machine
    ... > How is a character stored in a word aligned machine? ... > byte is used to store the character and the rest 7 bytes are wasted, ... but only by the particular implementations of it. ...
    (comp.lang.c)
  • Re: doubly-linked list & sorting
    ... char Emess; ... diff = -1; ...
    (comp.lang.c)