
Anatomy of a Program in Memory - rikelmens
http://duartes.org/gustavo/blog/post/anatomy-of-a-program-in-memory
======
Sir_Cmpwn
This may not be entirely related, but I've been building an open-source kernel
in z80 assembly for three and a half years now:
[https://github.com/KnightOS/kernel](https://github.com/KnightOS/kernel)

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'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 "userspace". 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.

Not sure if that's a valuable perspective, but thought you might find it
interesting. Here's some links:

[https://github.com/KnightOS/kernel/blob/master/docs/memory.m...](https://github.com/KnightOS/kernel/blob/master/docs/memory.md)

[https://github.com/KnightOS/kernel/blob/master/src/00/memory...](https://github.com/KnightOS/kernel/blob/master/src/00/memory.asm)

------
Nzen
There are a number of posts on this person'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]([http://wiki.osdev.org/Main_Page](http://wiki.osdev.org/Main_Page))
resource aggregator

~~~
rikelmens
Agreed. Gustavo writes very informative blog.

------
paulannesley
Just one of thirteen articles in the “Software Illustrated series” on the
authors "Best Of" page. [http://duartes.org/gustavo/blog/best-
of](http://duartes.org/gustavo/blog/best-of) The remaining twelve are on my
reading list now.

------
middleclick
Gustavo's articles are always a pleasure to read.

