Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 795339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:27:54+00:00 2026-05-14T22:27:54+00:00

While going through one project, I have seen that the memory data is 8

  • 0

While going through one project, I have seen that the memory data is “8 bytes aligned”. Can anyone please explain what this means?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:27:55+00:00Added an answer on May 14, 2026 at 10:27 pm

    An object that is “8 bytes aligned” is stored at a memory address that is a multiple of 8.

    Many CPUs will only load some data types from aligned locations; on other CPUs such access is just faster. There’s also several other possible reasons for using memory alignment – without seeing the code it’s hard to say why.


    Aligned access is faster because the external bus to memory is not a single byte wide – it is typically 4 or 8 bytes wide (or even wider). This means that the CPU doesn’t fetch a single byte at a time – it fetches 4 or 8 bytes starting at the requested address. As a consequence of this, the 2 or 3 least significant bits of the memory address are not actually sent by the CPU – the external memory can only be read or written at addresses that are a multiple of the bus width. If you requested a byte at address “9”, the CPU would actually ask the memory for the block of bytes beginning at address 8, and load the second one into your register (discarding the others).

    This implies that a misaligned access can require two reads from memory: If you ask for 8 bytes beginning at address 9, the CPU must fetch the 8 bytes beginning at address 8 as well as the 8 bytes beginning at address 16, then mask out the bytes you wanted. On the other hand, if you ask for the 8 bytes beginning at address 8, then only a single fetch is needed. Some CPUs will not even perform such a misaligned load – they will simply raise an exception (or even silently load the wrong data!).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 515k
  • Answers 515k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If your app is being downloaded by other people and… May 16, 2026 at 6:36 pm
  • Editorial Team
    Editorial Team added an answer \w only matches a single character. A single word would… May 16, 2026 at 6:36 pm
  • Editorial Team
    Editorial Team added an answer This looks like the right way in Java: http://knol.google.com/k/oracle-passing-a-list-as-bind-variable# It… May 16, 2026 at 6:36 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am working on a project for a client and going through the initial
I'm running myself through a C++ text book that I have as a refresher
I was going through someone's code where I came across a thread: while(TRUE) {
I have a parent object (part of a DAL) that contains, amongst other things,
Simple enough question, I just need to break through one minimal wall of confusion.
I'm going through the full tutorial at cplusplus.com, coding and compiling each example manually.
Compiling a CUDA enabled version of aircrack-ng that hasn't been bug-fixed in a while
I have a question about Clojure: I am trying to learn the language by
Something very odd is going on. It's been going on for some time, but
I'm trying to create a list of tasks that I've read from some text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.