audit-memory

Audit PMR allocation, container safety, and object lifetimes in C++ coroutine code.

5|1|Updated Dec 14, 2025
One-click install
npx skills add https://github.com/Hatedatastructures/Prism --skill audit-memory-hatedatastructures
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-memory
Source: https://github.com/Hatedatastructures/Prism/tree/main/.claude/skills/audit-memory
Command: npx skills add https://github.com/Hatedatastructures/Prism --skill audit-memory-hatedatastructures

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you catch memory allocation, lifetime, and container-safety bugs in high-performance C++ coroutine code before they turn into crashes, leaks, or undefined behavior.

Core Features & Use Cases

  • PMR resource review: Verifies whether hot-path, cross-thread, and temporary allocations use the right memory resource.
  • Container safety checks: Detects invalid iterator, pointer, and reference usage after growth, erase, insert, or suspension points.
  • Lifecycle and ownership audit: Reviews pooled objects, frame-scoped arenas, and coroutine resumes for dangling access risks.
  • Use case: A networking proxy update changes session storage and buffer handling; this Skill identifies whether the new code still respects zero-allocation hot paths and safe object lifetimes.

Quick Start

Ask me to review the changed files for PMR resource selection, container lifetime, and frame_arena usage in hot-path coroutine code.

Frequently Asked Questions about audit-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit PMR allocation safety in C++ coroutine code?

To audit PMR allocation safety in C++ coroutine code, review hot-path memory-resource selection, container MR consistency, and frame-arena scope to catch dangling references and cross-thread resource misuse before runtime crashes.

What causes invalid iterator and pointer usage in C++ coroutine suspension points?

Invalid iterator and pointer usage in C++ coroutine suspension points is caused by container growth, erase, or insert operations invalidating references after a co_await, requiring lifecycle and ownership audits of pooled objects and frame-scoped arenas.

How do I check frame_arena scope and pooled_object lifetime in hot-path networking code?

Check frame_arena scope and pooled_object lifetime by validating memory-resource selection, pooled allocation limits, and cleanup guarantees against coroutine resume flows to prevent dangling access in hot-path networking systems.

Does this PMR memory safety audit work for zero-allocation hot paths and session flows?

Yes, this PMR memory safety audit works for zero-allocation hot paths and session flows by verifying cross-thread temporary allocations, container MR consistency, and coroutine resume cleanup guarantees in high-performance C++ code.

What are the limitations of auditing C++ coroutine object lifetime and dangling references?

Limitations of auditing C++ coroutine object lifetime include detecting complex dangling reference risks across cross-thread resource misuse and iterator invalidation, which require validating frame-arena scope and pooled allocation limits in production behavior.