Advanced Programming in the UNIX Environment: Week 06, Segment 4 - The Environment
Channel: cs631apue
Date: 2020-10-06

In this video lecture, we're going to take a look at the process environment. We'll use what we learned about the process layout in memory to understand how the environment variables are stored and, if necessary, moved around.
We'll also get a quick look at what malloc(3) does.

Slides for this lecture: https://stevens.netmeister.org/631/06-env.pdf
Code Memory Layout: https://stevens.netmeister.org/631/memory-layout8.c
Code malloc(3): https://stevens.netmeister.org/631/malloc.c
Course website: https://stevens.netmeister.org/631/

Outline:
00:00 Introduction
00:25 env(1)
01:24 Location of the environment in memory
03:08 getenv(3) and friends
04:57 setenv(3)
05:39 malloc(3) and friends
07:34 putenv(3)
09:24 unsetenv(3)
10:24 Recap