Adding Memory Tagging to a Dynamic Memory Allocator
Who is this for?
This is an advanced topic for software developers who want to learn how to use the Memory Tagging Extension (MTE) to protect dynamic memory allocations.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Learn how to apply MTE to an existing memory allocator
- Understand how MTE can prevent common memory use errors
Prerequisites
Before starting, you will need the following:
- A Linux computer.
- Basic knowledge of how MTE works. Refer to the Learn about Memory Tagging Extension Learning Path
- Knowledge of how a dynamic memory allocator can be implemented. Refer to Write a Dynamic Memory Allocator Learning Path .
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
heap.c, heap.h, mte_utils.c, mte_utils.h, and main.c, then inspect the resulting exceptions.Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
heap.c and heap.h for allocator changes and mte_utils.c and mte_utils.h for tag helper logic. Use main.c to exercise the allocator and drive specific scenarios.main.c to the example functions and rebuild the project. Each function triggers a scenario so you can observe how the MTE-enabled allocator responds.main.c.