Chapter 8. Memory Management in C/C++

Table of Contents

The ASN1C Default Memory Manager
High Level Memory Management API
Built-in Compact Memory Management
Built-in Static Block Memory Management
Low Level Memory Management API
C++ Memory Management
Memory Security

This chapter describes ASN1C's memory manager. Users are encouraged to read this chapter when they need to replace ASN1C's memory manager or wish to have a deeper understanding of how memory is managed by the runtime context structure.

Dynamic memory is managed by ASN1C to improve the overall performance of encoding and decoding procedures, and understanding this management is imperative to avoiding memory problems in applications. ASN1C also supports replacing the memory manager with user-written objects at two levels: the high-level API called by the generated code and the low-level API that provides the core memory functionality.