What Is RAM, Actually?
What Is RAM, Actually? From Leaking Capacitors to Cache Lines Reading time: ~17 minutes You called malloc(). The kernel gave you an address. You stored a number there, read it back, and moved on wi...

Source: DEV Community
What Is RAM, Actually? From Leaking Capacitors to Cache Lines Reading time: ~17 minutes You called malloc(). The kernel gave you an address. You stored a number there, read it back, and moved on with your life. But what is that address? It's not a location on a chip — not in any way you'd recognize. It's an index into a grid of billions of capacitors, each one holding a single bit as an electrical charge that is, right now, draining away. The data you stored is evaporating. A circuit you've never thought about is racing to put it back before it disappears. And it does this for every single bit, millions of times per second, whether you're using the memory or not. This is what "random access memory" actually is. Let me show you the machinery. The Smallest Unit of Memory You Own Every bit in your RAM stick lives in a 1T1C cell: one transistor, one capacitor. That's it. Two components per bit. Your 16GB stick has roughly 137 billion of these cells. The capacitor stores the bit. A charged