0

In the x86 architecture is known that is better to use aligned access to improve the performance of the program, because if you don't use it the processor would require 2 memory accesses instead of only one.

If the OS is uses paging, the application programs don't care about the aligned access since the addresses they are using are the linear ones that will be converted into the physical ones by the OS pages.

So the OS has the responsability of using pages that really uses aligned access, is that right?

  • 1
    It is the job of the OS to setup the page mapping tables, the program is not involved and there is no alignment choice. A properly aligned memory access will never straddle a page boundary. The page size cannot be ignored completely, it does play a role when you map a file to memory, allocate address space or alter page protection attributes. – Hans Passant Feb 18 '15 at 12:14
  • possible duplicate of [How much does function alignment actually matter on modern processors?](http://stackoverflow.com/questions/22235236/how-much-does-function-alignment-actually-matter-on-modern-processors) – xmojmr Feb 18 '15 at 17:19

0 Answers0