gpu-compute: Fix valgrind memleak complaints

Fixes several memory leaks, mostly of small and medium severity. Fixes
mismatched new/new[] and delete/delete[] calls.

Change-Id: Iedafc409389bd94e45f330bc587d6d72d1971219
This commit is contained in:
Matthew Poremba
2024-05-02 11:39:48 -07:00
parent 386fb3d1cc
commit 2703fb5699
6 changed files with 31 additions and 10 deletions

View File

@@ -1735,7 +1735,7 @@ ComputeUnit::DataPort::processMemReqEvent(PacketPtr pkt)
SystemHubEvent *resp_event = new SystemHubEvent(pkt, this);
compute_unit->shader->systemHub->sendRequest(pkt, resp_event);
} else if (!(sendTimingReq(pkt))) {
retries.push_back(std::make_pair(pkt, gpuDynInst));
retries.emplace_back(pkt, gpuDynInst);
if (gpuDynInst) {
DPRINTF(GPUPort,
@@ -1772,7 +1772,7 @@ ComputeUnit::ScalarDataPort::MemReqEvent::process()
SystemHubEvent *resp_event = new SystemHubEvent(pkt, &scalarDataPort);
compute_unit->shader->systemHub->sendRequest(pkt, resp_event);
} else if (!(scalarDataPort.sendTimingReq(pkt))) {
scalarDataPort.retries.push_back(pkt);
scalarDataPort.retries.emplace_back(pkt);
DPRINTF(GPUPort,
"CU%d: WF[%d][%d]: addr %#x data req failed!\n",