How big is time_t? Alignment?

Hal Murray hmurray at megapathdsl.net
Fri May 13 09:28:08 UTC 2016


I was looking at the SHM layout, counting the size by hand.  The goal was to 
add a compile time sanity check.

I was off by 16 bytes.  :)  The first 8 were 2 time_t-s that I counted as 4 
bytes each rather than 8.  The other 8 were invisible padding so both of the 
time_t-s would be on 8 byte boundaries.

Are we interested in any systems with 32 bit time_t?
Do all the systems we are interested in put 64 bit things on 8 byte 
boundaries?


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list