<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Fundamentals on Ahmed Kafi</title><link>https://kafi.dev/tags/fundamentals/</link><description>Recent content in Fundamentals on Ahmed Kafi</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Fri, 31 Jul 2026 15:00:00 +0100</lastBuildDate><atom:link href="https://kafi.dev/tags/fundamentals/index.xml" rel="self" type="application/rss+xml"/><item><title>Stack vs heap: what actually lives where</title><link>https://kafi.dev/posts/stack-vs-heap/</link><pubDate>Fri, 31 Jul 2026 15:00:00 +0100</pubDate><guid>https://kafi.dev/posts/stack-vs-heap/</guid><description>&lt;p&gt;The stack and the heap are where almost all of a running program&amp;rsquo;s data sits. Most
explanations of them are roughly right and specifically wrong, usually in the same four
places. This is my attempt at getting it right, checked against a running VM rather than
recalled.&lt;/p&gt;
&lt;p&gt;Both are regions of a &lt;em&gt;process&amp;rsquo;s&lt;/em&gt; virtual address space. They are backed by RAM, but a
given page may be in cache, in RAM, or swapped to disk, and the addresses a program sees
are virtual ones the operating system maps on its behalf. RAM is called volatile because
it loses its contents without power. That is all the word means here — it is not a
collective name for the regions a program runs in.&lt;/p&gt;</description></item></channel></rss>