Capturing Memory Requests
List of: Discussion Topic
Subjects: Memory Management
Contents: Base

Some compilers support overloaded new and delete operators, and can support routing all memory requests to the memory manager. Other compilers have more limited capabilities, and support routing only a subset of memory calls to the memory manager.

Grouping compilers by capability, the types of memory operations routed to the memory manager for each group are as follows.

Each successive group represents a more comprehensive level of memory management, and each group encompasses both itself and lower level groups. For example, memory management functionality in Group 3 also includes the functionality in Group 2 and in Group 1.

Group 1 C run-time memory functions malloc, calloc, realloc, strdup, and free are routed through the memory manager.

Group 2 Class level new and delete operators are routed through the memory manager, as well as Group 1 memory requests.

ACIS classes are derived from the base class ACIS_OBJECT.



The ACIS_OBJECT::new and ACIS_OBJECT::delete operators in turn call the acis_allocate and acis_discard functions.



For memory not allocated to free lists, the acis_allocate and acis_discard functions currently call malloc, but can be replaced by the application developer to call other memory management systems, or can be tailored to do such things as memory usage auditing, garbage collection, etc.



Group 1 C run-time memory functions are routed through the memory manager.



If this is selected, a rebuild is required before the program can run.

Group 3 Class-level array new and array delete requests are routed through the memory manager, as well as Group 2 and Group 1 memory requests.

Group 4 Global new and array new, decorated with tracking information, are routed through the memory manager, as well as Group 3, Group 2, and Group 1 memory requests. At this level of memory management, all ACIS memory requests are routed through the memory manager (100% coverage).

At Group 4 or above, the developer can turn on or off the run-time directives for MMGR_DEBUG, NO_FREE_LISTS, and MMGR_AUDIT_LEAKS.
PDF/BASE/01CMP.PDF
HTM/DATA/BASE/BASE/01CMP/0006.HTM