0

I recently noticed windows doing long beeps ,which is supposedly a memory issue of 1a in BSOD error code, I run memtest and found faulty addresses shown below.

2024-01-24 14:20:11 - [Data Error] Test: 13, CPU: 0, Address: 293B98920, Expected: 5F0DF0A5, Actual: 5F8DF0A5
2024-01-24 14:18:53 - [Data Error] Test: 13, CPU: 0, Address: 293B98920, Expected: D70BA8A2, Actual: D78BA8A2
2024-01-24 14:17:20 - [Data Error] Test: 13, CPU: 0, Address: 293B98920, Expected: 1F1F39AC, Actual: 1F9F39AC
2024-01-24 14:17:05 - [Data Error] Test: 13, CPU: 0, Address: 293B98920, Expected: 50039BF9, Actual: 50839BF9

I have ~12gb of ram so the addresses go up to 31F000000 which is 12784MB but it also shows another 4 bytes which are the stored information in those addresses , how does that work? There are 13.404.995.584 addresses and each one of them stores 4 bytes?

theo1996
  • 48
  • 8

2 Answers2

3

Although the memory is byte-addressed, it is typical for programs (and even CPUs) to handle it in 16-bit (2-byte), 32-bit (4-byte), or even 64-bit (8-byte) units. For example, a program could store a 32-bit value across bytes 0xABC0...0xABC3, and it is said that the value is stored "at 0xABC0" (the rest of the range is implied). That's what memtest is doing here.

(Even at machine-code level, there are instructions to load e.g. a 32-bit-wide integer from memory as a single instruction with only the 'starting' address specified, which is usually faster than four one-byte-at-a-time instructions.)

grawity
  • 501,077
3

Memory reads and writes do not happen "per byte", they are aligned on "word boundaries".

That means that if your memory operates on 32-bit transfers then to read the third byte up from 0x000F0000 (so 0x000F0002) you must work down to the nearest 32-bit boundary 0x000F0000 and then transfer all four bytes to read the third one. For 64-bit memory, used by most modern systems, you must transfer a full 8-byte (64-bit) "word" from memory in order to read a single byte within that memory area.

Memtest has just chosen a default view that shows 4 bytes at a time instead of 8 or whatever the system memory transfer size is.

What software shows is often an arbitrary choice based on what people are most used to and is a choice between being succinct and being too verbose. Two blocks of 293B98920 51F22EAB is easier for a person to parse than 293B9892051f22eab


You cannot actually pass 0x000F0002 to a physical memory chip anyway. The lowest address lines that allow byte addressing get effectively hidden by the fact that modern memory uses a parallel data bus across a bank of memory chips. By using 8 chips (or 4 chips each with two memory banks) you essentially no longer "see" the lowest 3 bits of any address.

Those 8 chips will all be given the same address and then what gets marshalled out to the memory controller will be one long 64-bit word that is the contents of each memory chip lined up together.

That 64-bit word then gets put into a register in the processor.

Your processor then seeing you asked for the particular byte at 0x000F0002 goes through the 8 bytes it received and gives you the third byte. Those other bytes were received at the processor memory controller, and probably made it into the various CPU caches, the software simply didn't bother to display the rest of the data that was received.

Mokubai
  • 95,412