packet.hh (5386:5614618f4027) | packet.hh (5387:3323952c3bb4) |
---|---|
1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 441 unchanged lines hidden (view full) --- 450 srcValid(origPkt->srcValid), destValid(origPkt->destValid), 451 flags(clearFlags ? 0 : origPkt->flags), 452 time(curTick), senderState(origPkt->senderState) 453 { 454 } 455 456 /** Destructor. */ 457 ~Packet() | 1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 441 unchanged lines hidden (view full) --- 450 srcValid(origPkt->srcValid), destValid(origPkt->destValid), 451 flags(clearFlags ? 0 : origPkt->flags), 452 time(curTick), senderState(origPkt->senderState) 453 { 454 } 455 456 /** Destructor. */ 457 ~Packet() |
458 { if (staticData || dynamicData) deleteData(); } | 458 { 459 // If this is a request packet for which there's no response, 460 // delete the request object here, since the requester will 461 // never get the chance. 462 if (req && isRequest() && !needsResponse()) 463 delete req; 464 if (staticData || dynamicData) 465 deleteData(); 466 } |
459 460 /** Reinitialize packet address and size from the associated 461 * Request object, and reset other fields that may have been 462 * modified by a previous transaction. Typically called when a 463 * statically allocated Request/Packet pair is reused for 464 * multiple transactions. */ 465 void reinitFromRequest() { 466 assert(req->validPaddr); --- 199 unchanged lines hidden --- | 467 468 /** Reinitialize packet address and size from the associated 469 * Request object, and reset other fields that may have been 470 * modified by a previous transaction. Typically called when a 471 * statically allocated Request/Packet pair is reused for 472 * multiple transactions. */ 473 void reinitFromRequest() { 474 assert(req->validPaddr); --- 199 unchanged lines hidden --- |