文本内存分析命令行工具
文本
内存分析命令行工具
设计一个 C 语言进程内存分析器,涵盖堆追踪、泄漏检测、快照比较和多格式报告。
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.
使用建议
可让模型先提供模块设计与平台假设,再逐步实现进程附加和分析功能。