Skip to main content
Prompts C Process Memory Profiler Developer

developer coding user risk: low

C Process Memory Profiler Developer

Develop a memory profiling tool in C for analyzing process memory usage, implementing process attachment with minimal performance impact, heap analysis with allocation tracking, me…

PROMPT

Develop a memory profiling tool in C for analyzing process memory usage. Implement process attachment with minimal performance impact. Add heap analysis with allocation tracking. Include memory leak detection with stack traces. Implement memory usage visualization with detailed statistics. Add custom allocator hooking for detailed tracking. Include report generation in multiple formats. Implement filtering options for noise reduction. Add comparison functionality between snapshots. Include command-line interface with interactive mode. Implement signal handling for clean detachment.

EXPECTED OUTPUT

Format
code

SUCCESS CRITERIA

  • Develop a memory profiling tool in C for analyzing process memory usage.
  • Implement process attachment with minimal performance impact.
  • Add heap analysis with allocation tracking.
  • Include memory leak detection with stack traces.
  • Implement memory usage visualization with detailed statistics.
  • Add custom allocator hooking for detailed tracking.
  • Include report generation in multiple formats.
  • Implement filtering options for noise reduction.
  • Add comparison functionality between snapshots.
  • Include command-line interface with interactive mode.
  • Implement signal handling for clean detachment.

CAVEATS

Missing context
  • Target operating system/platform.
  • Permitted libraries or APIs (e.g., libunwind, valgrind-like).
  • Performance benchmarks or overhead limits.
  • Detailed output format examples.
  • Success criteria or test cases.
Ambiguities
  • Unclear target platform (e.g., Linux ptrace vs. Windows).
  • 'Minimal performance impact' lacks quantifiable criteria.
  • 'Visualization' unspecified (text, GUI, library?).
  • 'Multiple formats' for reports not listed.
  • Stack trace implementation method unclear (e.g., unwind library).

QUALITY

OVERALL
0.50
CLARITY
0.80
SPECIFICITY
0.60
REUSABILITY
0.30
COMPLETENESS
0.50

IMPROVEMENT SUGGESTIONS

  • Specify platform: 'Target Linux x86_64 using ptrace for process attachment.'
  • Quantify performance: 'Overhead <5% CPU during attachment.'
  • Clarify visualization: 'Console-based ASCII charts using ncurses.'
  • List formats: 'Reports in JSON, HTML, and plain text.'
  • Add constraints: 'No external dependencies beyond standard libc; <10k LOC.'

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR DEVELOPER