Is it possible to exclude bad memory? I have a MacBook Air 2012 (A1466) and it developed some memory errors.
It crashes every half hour and Apple Hardware Test says 


  4MEM/9/40000000: 0x79eea590


Unfortunately, RAM is soldered on the motherboard and it is not replaceable.

I did some research and found that it is possible to tell the operating system to ignore wrong memory addresses if you use Linux: Ubuntu Forums: Exclude Bad Memory 

Is is possible to somehow exclude faulty RAM addresses in Mac OS X?

I currently use Yosemite (10.10) but, I am willing to downgrade if necessary.
Your only option is to replace the offending hardware.  Unfortunatley, if you were able to hack a solution together, it would be removed after subsequent updates.  With El Capitan and later, SIP would prevent you from doing this.

You have two options:


Replace the logic board - very expensive  ($700 to $1000 USD)
Replace the RAM modules - less expensive ($300 to $500 USD)


There are shops that will do this type of repair like Rossman Group in NYC.  (Disclaimer:  I am not affiliated with this company in any way, I am just a satisfied client).  They can do board level repairs like this for half of what it would cost to replace the logic board.

That said, you may be able to find a functional (used) logic board on eBay as well.