Review Board 2.0.15


RubyPort: Fix evict/invalidate packet memory leak

Review Request #1813 - Created April 7, 2013 and submitted

Information
Joel Hestness
gem5
default
Reviewers
Default
Changeset 9630:2ea801a03fa5
---------------------------
RubyPort: Fix evict/invalidate packet memory leak

When using the o3 or inorder CPUs with many Ruby protocols, the caches may
need to forward invalidations to the CPUs. The RubyPort was instantiating a
packet to be sent to the CPUs to signal the eviction, but the packets were
not being freed by the CPUs. Consistent with the classic memory model, stack
allocate the packet and heap allocate the request so on
ruby_eviction_callback() completion, the packet deconstructor is called, and
deletes the request (*Note: stack allocating the request causes double
deletion, since it will be deleted in the packet destructor). This results in
the least memory allocations without memory errors.
Long runs with Valgrind and verified that the Ruby transitions that caused
these memory leaks were exercised. Multithreaded benchmarks with elevated
contention witness huge memory consumption decreases.

Issue Summary

1 0 1 0
Review request changed
Updated (April 9, 2013, 7:43 a.m.)

Status: Closed (submitted)