Allow using Capstone without heap allocations.
Author: Rot127Created Sep 24, 2026Updated Sep 24, 2026
LabelsCS-core-filesbuild & packagingPerformance
Feature
- New architecture module
- Support for processor extension
- Add more instruction details (elaborated below)
- Binding support for:
language - Other (elaborated below)
Describe the feature you'd like
We should add an API which allows using Capstone with stack allocated memory only.
This is not particular difficult to do. There are only very few places where heap memory is actually allocated.
In the arch modules it often allocates an additional MCInst object for disassembly. Besices that there is then only the main cs_insn, cs_details and MCInst.
Additional context
The current API should not change. Just and additional function would be nice.
Source: capstone-engine/capstone