In my code I have:

  Addr lAddr = req->getPaddr();
  PacketPtr data_pkt = new Packet(req, MemCmd::ReadReq, Packet::Broadcast);
  DynInstPtr inst = myQueue[i];
  inst->memData = new uint8_t[64];
  data_pkt->dataStatic(inst->memData);
  dcachePort->sendTiming(data_pkt);
  return lAddr;

What happen to data_pkt after returning from my function? Should I do
something with the packet after sending to cache?

On 1/2/12, Mahmood Naderan <[email protected]> wrote:
> The default code has no problem. Trying to find where is the fault in
> my code. However as I said I have not changed anything about snoop
> packets. I made some ReadReq packets and send to cache_impl.
>
> Thanks for yout reply.
>
> On 1/2/12, Nilay Vaish <[email protected]> wrote:
>> I don't have much understanding of this piece of code. At a high level,
>> the function is meant to implement the snooping behavior of cache
>> controllers. The cache controller is snopping on the bus. 'pkt' is the
>> packet seen on the bus. In case this controller or any higher controller
>> has the address (for which this packet is meant), then the controller
>> will invalidate that address.
>>
>> Running without your changes would be a good idea. It seems to me that
>> you
>> are creating some packet, and it is not being created properly.
>>
>> --
>> Nilay
>>
>>
>> On Sun, 1 Jan 2012, Mahmood Naderan wrote:
>>
>>> currently I have tried bzip2. I have made some changes but but snoop
>>> packets. I don't think my chnages has impact on snoop packets. It is
>>> worth to try the default code. Can you please tell what does this
>>> pieace of code do?
>>>
>>> On 1/1/12, Nilay Vaish <[email protected]> wrote:
>>>> Well, I understood what you wrote in the first email. The question what
>>>> is
>>>> it that you are trying to execute that results in this error. What
>>>> application? Have you made any changes?
>>>>
>>>> --
>>>> Nilay
>>>>
>>>> On Sun, 1 Jan 2012, Mahmood Naderan wrote:
>>>>
>>>>> sorry what? while debuging I see these statemnets are executed:
>>>>>
>>>>> cpuSidePort->sendTiming(snoopPkt);
>>>>> delete snoopPkt->senderState;
>>>>> delete snoopPkt;
>>>>>
>>>>> The second "delete" says  double free or corruption
>>>>>
>>>>> On 1/1/12, Nilay Vaish <[email protected]> wrote:
>>>>>> What are you trying to execute?
>>>>>>
>>>>>> --
>>>>>> Nilay
>>>>>>
>>>>>> On Sun, 1 Jan 2012, Mahmood Naderan wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> Consider this statements in cache_impl.hh::handleSnoop()
>>>>>>>
>>>>>>> cpuSidePort->sendTiming(snoopPkt);
>>>>>>> if (snoopPkt->memInhibitAsserted()) {
>>>>>>>    assert(!alreadyResponded);
>>>>>>>    pkt->assertMemInhibit();
>>>>>>> } else {
>>>>>>>    delete snoopPkt->senderState;
>>>>>>> }
>>>>>>> if (snoopPkt->sharedAsserted()) {
>>>>>>>   pkt->assertShared();
>>>>>>> }
>>>>>>> delete snoopPkt;
>>>>>>>
>>>>>>> I have noticed that when
>>>>>>> delete snoopPkt->senderState;
>>>>>>>
>>>>>>> is executed, and then
>>>>>>> delete snoopPkt;
>>>>>>>
>>>>>>> I get this error:
>>>>>>>
>>>>>>> *** glibc detected *** /home/mahmood/gem5/build/X86_SE/m5.debug:
>>>>>>> double free or corruption (fasttop): 0x0000000002a8a640 ***
>>>>>>>
>>>>>>> Is it a bug or something else. Can someone verify that?
>>>>>>>
>>>>>>> --
>>>>>>> // Naderan *Mahmood;
>>>>>>> _______________________________________________
>>>>>>> gem5-users mailing list
>>>>>>> [email protected]
>>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>>
>>>>>> _______________________________________________
>>>>>> gem5-users mailing list
>>>>>> [email protected]
>>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> // Naderan *Mahmood;
>>>>> _______________________________________________
>>>>> gem5-users mailing list
>>>>> [email protected]
>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>>
>>>> _______________________________________________
>>>> gem5-users mailing list
>>>> [email protected]
>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>>
>>>
>>>
>>> --
>>> --
>>> // Naderan *Mahmood;
>>> _______________________________________________
>>> gem5-users mailing list
>>> [email protected]
>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>>
>> _______________________________________________
>> gem5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
>
> --
> --
> // Naderan *Mahmood;
>


-- 
--
// Naderan *Mahmood;
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to