Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
How are small data types aligned on 64 bit systems?
Post Flair (click to view more posts with a particular flair)
Post Body

I am learning cpp and was wondering how is say a 4 byte int aligned on 64 bit systems.My understanding is a 64 bit processor would read in 8 bytes blocks.So even though int data type requires 4 bytes, if following:

int x = 2;

is stored at say address 100, will it cause efficiency issues for processor.Like processor will read 8 bytes from 96 to 103(not sure if that even makes sense with security boundaries) and zero out first 4 bytes?

Or will compiler make sure it is stored at 8 byte boundary?

Author
Account Strength
50%
Account Age
2 years
Verified Email
Yes
Verified Flair
No
Total Karma
213
Link Karma
197
Comment Karma
16
Profile updated: 3 days ago
Posts updated: 3 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
10 months ago