TOC PREV NEXT INDEX


The ASN1C Default Memory Manager



The default ASN1C run-time memory manager uses an algorithm called the nibble-allocation algorithm. What this means is that large blocks of memory are allocated up front and then split up to provide memory for smaller allocation requests. This reduces the number of calls required to the C malloc and free functions. These functions are very expensive in terms of performance.

The large blocks of memory are tracked through the ASN.1 context block (ASN1CTXT) structure. For C, this means that an initialized context block is required for all memory allocations and deallocations. All allocations are done using this block as an argument to routines such as rtMemAlloc. All memory can be released at once when a user is done with a structure containing dynamic memory items by calling rtMemFree. Other functions are available for doing other dynamic memory operations as well. See the C/C++ Run-time Reference Manual for details on these.


Objective Systems, Inc.

102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX