On Tue, 13 Oct 2009 04:40:58 +0100, nathan binkert <[email protected]>  
wrote:

>>> It seems to me that you need to use the chunk generator or some
>>> looping construct to loop over all of the pages that may have been
>>> allocated and check each individual page to make sure that they are
>>> all zeroed (because the brk can be incremented by many pages.)
>>>
>> That's what I was trying to achieve with the patch. If the simulator
>> allocates the page then it is full of zeros anyway. If the page already
>> exists then I need to fill it. Going from b) to c) above I need to zero
>> out the top of page 0x10099000, but not the whole page or I could
>> obviously wipe out some of the application's data. However, I can't  
>> cross
>> a page boundary because I might then try to write to an unallocated  
>> page.
>> I can split this into two loops if you'd prefer - the original that
>> allocates pages and a second that zeros them out?
> No, that was my bad.  I read the patch wrong.  I thought that your new
> code was separate from the loop.  I think it is fine the way it is.
>
Ok, no problem. I'll leave this part of the patch alone and resubmit using  
the memsetBlob function for the first part a bit later.

Cheers
Tim

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to