What is the smallest unit of memory in your computer? is byte, which is bytes.
A data type greater than byte is stored in memory in order of precedence.
high memory address put an integer high, low memory address put an integer low, this way is called inverted put, the term is called small end alignment . both the computer X86 and the mobile arm are small-aligned.
high memory address put an integer low, lower memory address put an integer high, this way is called positive, the term is called big- endian alignment . many UNIX server CPUs are in the big-endian alignment.
Define a variable A of type int, and under VS2017 you can see how it is arranged in memory as follows:
So how do you look at the memory under the VS2017 compiler?
1. First open the VS2017 compiler, create a good project, and write the test code in.
2, debugging the time to do the corresponding breakpoint , and then click Start Debugging.
The steps are: On the tab click: Debug (D)--Start Debugging (S)
After: debug (D)--Window (W)--Memory (M)--memory (1) 1
3. Enter the address you want to view in the address bar of the Memory 1 window , and the value of the Auto window to see the address.
Operation results such as:
Indicates that the Windows system is stored in memory for a data type larger than byte : small-aligned.
Under Windows: Big-endian alignment and small-end alignment