diff --git a/chapters/8-Optimizing-Memory-Accesses/8-5 Memory Profiling.md b/chapters/8-Optimizing-Memory-Accesses/8-5 Memory Profiling.md index 884068bdb9..1b8aa988ab 100644 --- a/chapters/8-Optimizing-Memory-Accesses/8-5 Memory Profiling.md +++ b/chapters/8-Optimizing-Memory-Accesses/8-5 Memory Profiling.md @@ -18,6 +18,8 @@ Next, we will introduce the terms *memory usage* and *memory footprint* and see Memory usage is frequently described by Virtual Memory Size (VSZ) and Resident Set Size (RSS). VSZ includes all memory that a process can access, e.g., stack, heap, the memory used to encode instructions of an executable, and instructions from linked shared libraries, including the memory that is swapped out to disk. On the other hand, RSS measures how much memory allocated to a process resides in RAM. Thus, RSS does not include memory that is swapped out or was never touched yet by that process. Also, RSS does not include memory from shared libraries that were not loaded to memory. +[TODO]: mention that on Windows VSZ relates to Committed Memory Size and RSZ relates to Working Set. + Consider an example. Process `A` has 200K of stack and heap allocations of which 100K resides in the main memory, the rest is swapped out or unused. It has a 500K binary, from which only 400K was touched. Process `A` is linked against 2500K of shared libraries and has only loaded 1000K in the main memory. ```