{"id":29091128,"url":"https://github.com/opikadash/memory-management-simulator","last_synced_at":"2025-06-28T06:05:41.319Z","repository":{"id":301415460,"uuid":"1008742012","full_name":"Opikadash/memory-management-simulator","owner":"Opikadash","description":"C++ Memory Management Simulator implementing First-Fit and Best-Fit allocation strategies with support for random stress testing, memory state persistence, CSV export for visualization, and benchmarking via GoogleTest.","archived":false,"fork":false,"pushed_at":"2025-06-26T18:20:06.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-26T19:26:28.807Z","etag":null,"topics":["best-fit","cpp","data-structures","first-fit","googletest","makefile","operating-systems","simulation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Opikadash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-26T03:07:00.000Z","updated_at":"2025-06-26T18:29:29.000Z","dependencies_parsed_at":"2025-06-26T19:36:36.465Z","dependency_job_id":null,"html_url":"https://github.com/Opikadash/memory-management-simulator","commit_stats":null,"previous_names":["opikadash/memory-management-simulator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Opikadash/memory-management-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Opikadash%2Fmemory-management-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Opikadash%2Fmemory-management-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Opikadash%2Fmemory-management-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Opikadash%2Fmemory-management-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Opikadash","download_url":"https://codeload.github.com/Opikadash/memory-management-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Opikadash%2Fmemory-management-simulator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262382729,"owners_count":23302296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["best-fit","cpp","data-structures","first-fit","googletest","makefile","operating-systems","simulation"],"created_at":"2025-06-28T06:05:39.718Z","updated_at":"2025-06-28T06:05:41.309Z","avatar_url":"https://github.com/Opikadash.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"```markdown\n# 🧠 Memory Management Simulator\n\n🚀 A modern C++ simulator that models memory allocation using **First-Fit** and **Best-Fit** strategies. Designed to emulate real-world memory management in operating systems, this project features a runtime strategy switch, stress testing, data export, and optional unit testing via GoogleTest.\n\n---\n\n## ✨ Features\n\n- 🔁 **Allocation Strategies**: Switch between First-Fit and Best-Fit at runtime\n- 📊 **Exportable Logs**: Memory block states saved to CSV for analysis\n- 🧪 **Random Stress Testing**: Dynamically simulate fragmentation and load\n- 💾 **Save/Load State**: Resume memory states using file I/O\n- 🧠 **CLI-Based UI**: Intuitive and interactive user interface\n- ✅ **Unit Tests**: Written using GoogleTest (via `vcpkg`)\n- 🧵 **Modular Design**: Clear separation of core logic and utilities\n\n\n---\n\n## 🔧 Getting Started\n\n### 📦 Prerequisites\n\n- CMake ≥ 3.16\n- C++17 compiler (MSVC, GCC, or Clang)\n- [vcpkg](https://github.com/microsoft/vcpkg) (for dependency management)\n\n### 🛠️ Build Instructions\n\n```bash\ngit clone https://github.com/Opikadash/memory-management-simulator.git\ncd MemoryManagementSimulator\ncmake -B build\ncmake --build build\n````\n\n### ✅ Run the Simulator\n\n```bash\n./build/simulator\n```\n\n---\n\n## 🧪 Running Unit Tests (Optional)\n\nInstall GoogleTest using [vcpkg](https://github.com/microsoft/vcpkg):\n\n```bash\nvcpkg install gtest\n```\n\nThen build with tests:\n\n```bash\ncmake -DENABLE_TESTING=ON -B build\ncmake --build build\ncd build \u0026\u0026 ctest\n```\n\n---\n\n## 📈 Visualize Memory Logs\n\n```bash\npython scripts/visualize_memory.py data/memory_log.csv\n```\n\nCreates a time-series graph of allocation and fragmentation over time.\n\n---\n\n## 📜 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\n---\n\n## ✅ `CMakeLists.txt`\n\n```cmake\ncmake_minimum_required(VERSION 3.16)\nproject(MemoryManagementSimulator)\n\nset(CMAKE_CXX_STANDARD 17)\nset(CMAKE_EXPORT_COMPILE_COMMANDS ON)\n\n# Include header files\ninclude_directories(include)\n\n# Build core simulator\nadd_executable(simulator\n    src/main.cpp\n    src/memory_manager.cpp\n)\n\n# GoogleTest-based unit tests\noption(ENABLE_TESTING \"Enable Unit Tests\" ON)\nif(ENABLE_TESTING)\n    enable_testing()\n    find_package(GTest CONFIG REQUIRED)\n    add_executable(simulator_tests\n        tests/test_memory_manager.cpp\n        src/memory_manager.cpp\n    )\n    target_include_directories(simulator_tests PRIVATE include)\n    target_link_libraries(simulator_tests GTest::gtest_main)\n    include(GoogleTest)\n    gtest_discover_tests(simulator_tests)\nendif()\n````\n\n---\n\n\n\n---\n\n## ✅ `LICENSE` (MIT)\n\n```text\nMIT License\n\nCopyright (c) 2025 [Opika]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy...\n```\n\n---\n\n\n```\n\n\u003e 📌 Make sure GoogleTest is globally installed or built locally and linked properly.\n\n---\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopikadash%2Fmemory-management-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopikadash%2Fmemory-management-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopikadash%2Fmemory-management-simulator/lists"}