Exercise on memory management analyzer

This commit is contained in:
Fabio Scotto di Santolo
2025-08-21 18:19:45 +02:00
parent 04b33c03ef
commit 99cbf7d4fb
7 changed files with 371 additions and 11 deletions

View File

@@ -36,13 +36,13 @@ This is an organized list of all exercises completed so far, including a brief d
**Description**: A simple C program that sequentially executes one or more bash scripts, printing each scripts exit status.
- 📄 [README](run_scripts/README.md)
- 📂 Directory: `run_scripts/`
- ✅ Features:
- Uses `fork()` and `execlp()` to run each script in a child process
- Waits for each child to finish before executing the next
- Reports normal exit code or termination by signal
- Includes example test scripts and memory checks with Valgrind
- 📄 [README](run_scripts/README.md)
- 📂 Directory: `run_scripts/`
- ✅ Features:
- Uses `fork()` and `execlp()` to run each script in a child process
- Waits for each child to finish before executing the next
- Reports normal exit code or termination by signal
- Includes example test scripts and memory checks with Valgrind
- Makefile with targets: `build`, `run`, `test`, `valgrind`, and `clean`
---
@@ -51,8 +51,8 @@ This is an organized list of all exercises completed so far, including a brief d
**Description**: A multi-threaded simulated file downloader implemented in C using POSIX threads (pthreads).
- 📄 [README](downloader/README.md)
- 📂 Directory: `downloader/`
- 📄 [README](downloader/README.md)
- 📂 Directory: `downloader/`
- ✅ Features:
- Each thread simulates downloading a file by printing periodic progress updates
- Synchronization using `pthread` APIs
@@ -61,6 +61,20 @@ This is an organized list of all exercises completed so far, including a brief d
---
## 🧠 memory_analyzer
**Description**: A simple memory analyzer that allocates memory blocks of different sizes and prints current memory usage.
- 📄 [README](mem_analyzer/README.md)
- 📂 Directory: `mem_analyzer/`
- ✅ Features:
- Allocates blocks using `malloc` and frees them after measurement
- Reports current memory usage via `/proc/self/status`
- Minimal implementation aligned with the exercise objectives
- Makefile included with standard targets
---
## 🔧 Tooling & Automation
**Shared tools and scripts used across projects**:
@@ -69,5 +83,3 @@ This is an organized list of all exercises completed so far, including a brief d
- Targets for `build`, `test`, `valgrind`, and `clean`
- Shell script for automated tests: `run_tests.sh`
- Valgrind memory check reports generated automatically
*Last updated: 2025-07-30*