Improving the practicality of transactional memory