NetworkTest: remove unnecessary memory allocation
This commit is contained in:
parent
4f4a710457
commit
dbe1608fd5
1 changed files with 1 additions and 3 deletions
|
@ -274,7 +274,6 @@ NetworkTest::generatePkt()
|
||||||
}
|
}
|
||||||
|
|
||||||
req->setThreadContext(id,0);
|
req->setThreadContext(id,0);
|
||||||
uint8_t *result = new uint8_t[8];
|
|
||||||
|
|
||||||
//No need to do functional simulation
|
//No need to do functional simulation
|
||||||
//We just do timing simulation of the network
|
//We just do timing simulation of the network
|
||||||
|
@ -286,8 +285,7 @@ NetworkTest::generatePkt()
|
||||||
PacketPtr pkt = new Packet(req, requestType, 0);
|
PacketPtr pkt = new Packet(req, requestType, 0);
|
||||||
pkt->setSrc(0); //Not used
|
pkt->setSrc(0); //Not used
|
||||||
pkt->dataDynamicArray(new uint8_t[req->getSize()]);
|
pkt->dataDynamicArray(new uint8_t[req->getSize()]);
|
||||||
NetworkTestSenderState *state = new NetworkTestSenderState(result);
|
pkt->senderState = NULL;
|
||||||
pkt->senderState = state;
|
|
||||||
|
|
||||||
sendPkt(pkt);
|
sendPkt(pkt);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue