Software transactional memory is a promising programming model that adapts many concepts borrowed from the databases world to control concurrent accesses to main memory (RAM) locations. This paper discusses how to support apparently irreversible operations, such as memory allocation and deallocation, within software libraries that will be used in (software memory) transactional contexts, and propose a generic and elegant approach based on a handler system, which provide the means to create and execute compensation actions at key moments during the life-time of a transaction.This work was partially supported by Sun Micro-Systems and Sun Microsystems Portugal under the “Sun Worldwide Marketing Loaner Agreement #11497”, by the CITI–Centro de I...