https://github.com/kporus/gc-visualizer
https://github.com/kporus/gc-visualizer
inspect psutil python streamlit
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kporus/gc-visualizer
- Owner: KPorus
- Created: 2025-08-01T05:39:12.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-08-01T05:40:45.000Z (9 months ago)
- Last Synced: 2025-09-13T21:52:39.393Z (8 months ago)
- Topics: inspect, psutil, python, streamlit
- Language: Python
- Homepage: https://gc-visualizer-hpe9rcie4gxfwm54n3fwpp.streamlit.app/
- Size: 69.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# ๐งน Python GC Visualizer
An interactive tool to understand and experiment with Python's built-in garbage collection (GC) system โ especially how it handles **circular references** and unreachable objects.
Built using **Streamlit**, this educational tool helps visualize and debug memory management behavior in real time.
---
## ๐ Features
* โ
Create Python objects with or without circular references
* ๐งผ Force garbage collection manually
* ๐ View memory usage and unreachable object count
* ๐ Toggle circular references to simulate GC edge cases
* ๐ง Show internal GC debug statistics
* ๐ฆ Live summary of object types in memory
---
## ๐งช Usage
1. **Launch app locally**:
```bash
streamlit run app.py
```
2. **Explore buttons**:
* Create and delete objects
* Toggle circular references
* Force GC and monitor behavior
3. **Understand output**:
* See how memory usage changes
* Discover how many objects GC can reclaim
* Use object type summary to detect object leaks
---
## ๐ธ Screenshots
> (You can add screenshots here after running it!)

---
## ๐ง What You'll Learn
* How Python tracks and reclaims memory
* Why circular references need a GC (not just reference counting)
* How to analyze memory behavior using `gc`, `psutil`, and `inspect`
---
## ๐ ๏ธ Tech Stack
* **Python 3.9+**
* **Streamlit** โ for the interactive frontend
* **gc**, **psutil**, **inspect** โ for memory analysis
---
## ๐ License
MIT โ use freely and learn boldly!