ABSTRACT

Most modern programs are designed using dynamic memory management services, such as allocation and deallocation of varying sizes of memory at runtime. In traditional forward-only execution of programs, this typically translates to two basic primitives: a primitive for allocation that searches for and returns the pointer to a free region in memory that can fit the requested memory size, and another primitive for deallocation of previously allocated memory regions for returning into the free pool of memory for later reuse. When these two primitives are to be utilized inside a reversible program, however, new issues arise that are simply absent in a forward-only mode. An allocation must be undone by freeing the allocated memory if the allocation operation itself is reversed. Similarly, a deallocation operation must not immediately release the memory because the deallocation itself may be reversed. Otherwise, the memory incorrectly released may be reused by another allocation, which will result in an undesirable situation in which two logically distinct objects occupy the same memory space. Moreover, the dynamic memory management interface should be extended so that it is dynamically provided information about guarantees that a particular allocation is not tentative, and about situations when a deallocation is in fact correct (i.e., the deallocation will not be reversed).