Patent ID: 7747565

Claim:
A method for efficiently utilizing memory during execution of a program on a computer system having a software transactional memory system, the software transactional memory system allocating space in a memory for storing objects created by the currently-executing program, the software transactional memory system having a transaction manager for managing plural accesses by the currently-executing program to one or more of the objects in the memory as atomic transactions, the software transactional memory system further having one or more software transactional memory logs containing log entries created by the transaction manager for managing the accesses to the objects in the transactions, the software transactional memory logs including at least a read-object log, the log entries referencing objects accessed in the transactions, the method comprising: utilizing a garbage collector to de-allocate unnecessary log entries from one or more software transactional memory logs while the software transaction memory logs remain in use by the transaction manager, including the read-object log, during garbage collection by the garbage collector of objects created by and no longer reachable by the currently-executing program; wherein the one or more software transactional memory logs comprise logs identifying objects on which a transaction has attempted access; and wherein utilizing a garbage collector to de-allocate unnecessary log entries from the software transactional memory log comprises: determining one or more unreachable objects which are known to be unreachable by the currently-executing program; and de-allocating unnecessary log entries from the logs, the entries referencing the one or more unreachable objects, the one or more unreachable objects being separate from the unnecessary log entries which are de-allocated.