Last active
February 3, 2026 22:01
-
-
Save antic183/5d9c062e48b8d6fa52a2274fa7fcb939 to your computer and use it in GitHub Desktop.
Speicherlayout eines Programms (process memory layout)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Hohe Speicheradressen | |
| +--------------------------------------------------+ | |
| | Stack ↓ | ← wächst nach unten | |
| | Stack Frame: foo() | | |
| | - Rücksprungadresse → Text-Segment | ← Adresse im Programmcode, wohin return geht | |
| | - Parameter der Funktion | | |
| | - Lokale Variablen | | |
| | - Zeiger/Referenzen auf Heap-Objekte | ← falls lokale Variablen Objekte referenzieren | |
| | | | |
| | Stack Frame: bar() | | |
| | - Rücksprungadresse → Text-Segment | | |
| | - Parameter | | |
| | - Lokale Variablen | | |
| | - Zeiger/Referenzen auf Heap-Objekte | | |
| +--------------------------------------------------+ | |
| | Heap ↑ | ← wächst nach oben | |
| | Objekt: obj1 | | |
| | - Feld x = 10 | | |
| | - Feld y = 20 | | |
| | | | |
| | Objekt: obj2 | | |
| | - Feld a | | |
| | - Feld b | | |
| | | | |
| | Arrays / dynamisch allokierte Daten | | |
| +--------------------------------------------------+ | |
| | BSS | ← globale/statische Variablen (nicht initialisierte Variablen) | |
| +--------------------------------------------------+ | |
| | Data | ← globale/statische Variablen (initialisierte Variablen) | |
| +--------------------------------------------------+ | |
| | Text | ← Programmcode | |
| | Funktionen / Methoden | | |
| | Maschinencode | | |
| +--------------------------------------------------+ | |
| Niedrige Speicheradressen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment