Skip to content

Commit

Permalink
Added review comment ++
Browse files Browse the repository at this point in the history
  • Loading branch information
dendibakh committed Feb 17, 2024
1 parent 0969e43 commit 5578f01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chapters/8-Optimizing-Memory-Accesses/8-5 Memory Profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```
Expand Down

0 comments on commit 5578f01

Please sign in to comment.