struct tm的大小

Rad*_*dha 3 c linux sizeof ctime

我使用sizeof()运算符在C中打印sizeof(struct tm)它给了我44个字节.但是在ctime的手册页中它有9个int变量用于time.then它的大小应该是36.它如何给出44?

Red*_*edX 5

http://linux.die.net/man/3/ctime

struct tm的glibc版本有其他字段

long tm_gmtoff;           /* Seconds east of UTC */
const char *tm_zone;      /* Timezone abbreviation */
Run Code Online (Sandbox Code Playgroud)

这就是你额外的字节来自(可能).