Corrupted soldered on memory.

So my old, but not heavily used, laptop is starting to become very slow and I’ve had some out of the blue crashes. It’s a Sony Vaio ultraportable bought back in 2013. At the time it was quite good, SSD disk and a light package.

Since I am going to use the laptop for work I did a memory test most for fun. I was not aware of the memory being faulty. A pass in MemTest86 revealed a bit error, and after that I has been sitting thinking about the error all the time.

Oh no!

Since I really do not need a new machine for the work I do on the laptop, usually only used as a thin client via a RDP connection to my beast-machine for compiling Chromium and writing Javascript UIs on top of that. I had to do something to make the laptop stable. Started searching the web, because I did remember Linux having an option to mark memory as bad. Turned out Windows has that possibility too. Windows Boot Options.

How to manage the PFD Memory List does not hint about how to manually add an address to the bad memory list. First we need to find out how this is done, and if it is possible on a system without ECC memory.

Found a very nice overview on how to do this here.

So the bit-error I’ve got in my 8GB og memory is at the following address. and Windows can mark 4kB blocks as bad, we need to mark 0x34be000 to 0x34bd000 as bad.

C:\WINDOWS\system32>bcdedit /enum {badmemory}

RAM Defects
-----------
identifier              {badmemory}

C:\WINDOWS\system32>bcdedit /set {badmemory} badmemoryaccess no
The operation completed successfully.

C:\WINDOWS\system32>bcdedit /enum {badmemory}

RAM Defects
-----------
identifier              {badmemory}
badmemoryaccess         No
C:\WINDOWS\system32>bcdedit /set {badmemory} badmemorylist 0x34be000 0x34bd000 
The operation completed successfully.

C:\WINDOWS\system32>bcdedit /enum {badmemory}

RAM Defects
-----------
identifier              {badmemory}
badmemoryaccess         No
badmemorylist           0x34be000
                        0x34bd000

After a reboot the corrupted memory is avoided by Windows, and I should not get random crashes because of this.