TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Anatomy of a Program in Memory

81 pointsby rikelmensover 11 years ago

4 comments

Sir_Cmpwnover 11 years ago
This may not be entirely related, but I&#x27;ve been building an open-source kernel in z80 assembly for three and a half years now: <a href="https://github.com/KnightOS/kernel" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;KnightOS&#x2F;kernel</a><p>I might chime in with a perspective of someone working on 70s hardware without memory protection, ring modes, or enough RAM to page it around. In my system, all processes run as root (since we can&#x27;t stop them from doing so on a z80), and share one big memory block. The kernel takes up the first 0x500 bytes of memory (which can be changed at kernel compile time), and the remaining 0x7A00 bytes of memory is distributed among the &quot;userspace&quot;. Programs allocate memory here in a first-come, first-serve basis, and their own program memory, stack, and allocated space are all thrown together in this big userland memory space.<p>Not sure if that&#x27;s a valuable perspective, but thought you might find it interesting. Here&#x27;s some links:<p><a href="https://github.com/KnightOS/kernel/blob/master/docs/memory.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;KnightOS&#x2F;kernel&#x2F;blob&#x2F;master&#x2F;docs&#x2F;memory.m...</a><p><a href="https://github.com/KnightOS/kernel/blob/master/src/00/memory.asm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;KnightOS&#x2F;kernel&#x2F;blob&#x2F;master&#x2F;src&#x2F;00&#x2F;memory...</a>
Nzenover 11 years ago
There are a number of posts on this person&#x27;s blog about the embedded realm. OP_link concerns programs asking for heap space. There are a number of useful explanations about cache, physical memory, and kernel bootloading. Probably worth putting on an embedded or [OS dev](<a href="http://wiki.osdev.org/Main_Page" rel="nofollow">http:&#x2F;&#x2F;wiki.osdev.org&#x2F;Main_Page</a>) resource aggregator
评论 #7086983 未加载
paulannesleyover 11 years ago
Just one of thirteen articles in the “Software Illustrated series” on the authors &quot;Best Of&quot; page. <a href="http://duartes.org/gustavo/blog/best-of" rel="nofollow">http:&#x2F;&#x2F;duartes.org&#x2F;gustavo&#x2F;blog&#x2F;best-of</a> The remaining twelve are on my reading list now.
middleclickover 11 years ago
Gustavo&#x27;s articles are always a pleasure to read.