Processing storage deallocation APIs

The libddpi uses its own memory management processes when creating and terminating libddpi objects. In addition, some operations allocate memory on behalf of the program analysis (user) application. The ddpi_dealloc operation frees memory that was allocated on behalf of an application.

Description

Examples of how to use ddpi_dealloc are given for each operation that requires it. For example, the ddpi_access_list_elf operation allocates memory in order to list the Ddpi_Elf objects associated with the given Ddpi_Access object. The code that deletes this list is:
ddpi_dealloc (info, *ret_elfs, DDPI_DLA_LIST)
where ret_elfs is the returned list.
Use the ddpi_dealloc operation only when it is recommended in the header file. The effect of using this operation on unknown pointers is undefined.