Methods and systems are provided for managing memory allocations and
deallocations while in transactional code, including nested transactional
code. The methods and systems manage transactional memory operations by
using identifiers, such as sequence numbers, to handle memory management
in transactions. The methods and systems also maintain lists of deferred
actions to be performed at transaction abort and commit times. A number
of memory management routines associated with one or more transactions
examine the transaction sequence number of the current transaction,
manipulate commit and/or undo logs, and set/use the transaction sequence
number of an associated object, but are not so limited. The methods and
systems provide for memory allocation and deallocations within
transactional code while preserving transactional semantics. Other
embodiments are described and claimed.