1 minute: Process Layout in Memory

Dave Ng
Jul 14, 2023

--

Last time, I mentioned memory is a stack but actually, it’s not just that

The process has 3 segments: text, data, and stack

So text is basically the actual code of the program. That’s right so that is basically that can just be allocated statically because once you load a program into memory and start running it the actual code of the program is never going to change.

For the stack, as your program executes you make a function call, such as push off rounds onto the stack and return from the call, you will pop a return value off the stack

Then for the data or the heat which is where your data is stored

And the process layer in memory is managed by a set of “registers”, which we will take a look soon.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response