khaneliman avatar

memory-profiler

Diagnose and refactor cross-language memory problems.

version
0.1.6
GitHub stars
347

Install

/plugin install memory-profiler@khanelinix-ai-tools

Run it inside Claude Code after adding the marketplace with /plugin marketplace add khaneliman/khanelinix.

Contents

Discovered from source

Skills 1

Memory Profiler

This skill provides a framework for diagnosing memory inefficiencies, capturing memory profiles, and refactoring systems across several programming languages.

Core Concepts

  • Memory Wall: Speed and efficiency are constrained by memory spatial locality, access patterns, and allocation overhead.
  • Fragmentation: Frequent allocations/deallocations cause heap memory to fragment, forcing OS to allocate additional pages.
  • Data-Oriented Design (DOD): Refactoring from Array of Structures (AoS) to Structure of Arrays (SoA) guarantees homogenous data fields are packed tightly, optimizing CPU cache usage and minimizing RAM latency.

Language Specific Guides

For instructions on memory profiling, tooling workflows, and refactoring strategies for a specific language, load the corresponding reference document:

  • C++: See references/cpp.md for Valgrind, Heaptrack, Memory Pools, and SSO.
  • Rust: See references/rust.md for Jemallocator, Dhat, Collection Bounding, Cow, and Arc.
  • TypeScript & Node.js: See references/node.md for V8 Inspector, Clinic.js, Object Pooling, and Closure scope mitigation.
  • .NET (C#): See references/dotnet.md for dotnet-counters, dotnet-gcdump, ArrayPool, and struct conversions.
  • Python: See references/python.md for Tracemalloc, Memray, __slots__, Generators, and String Interning.

Use these files to perform high-level memory analysis, locate leaks, and apply the appropriate refactoring pattern.

Sponsors

Details

Marketplace
khaneliman/khanelinix
Source
modules/common/ai-tools/skills/memory-profiler
Author
khaneliman
Category
Developer Tools

More from khaneliman/khanelinix

All 43