> On Feb. 2, 2012, 7:07 p.m., Steve Reinhardt wrote:
> > src/sim/system.cc, line 299
> > <http://reviews.gem5.org/r/1024/diff/1/?file=22905#file22905line299>
> >
> >     Don't you want to multiply npages by the page size?  Or better yet, 
> > wouldn't
> >         if (pagePtr > physmem->size())
> >     work?
> >     
> >     (note > not >= since pagePtr can legally be one past the end, I believe)
> >     
> >     thanks for catching this though... I believe I'm the one that 
> > introduced this.

Oh, right, good point. My change would be correct if everything were being done 
in pages. I'll change it to "if (pagePtr > physmem->size())", run some quick 
regressions, and push it.


- Gabe


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/1024/#review2072
-----------------------------------------------------------


On Feb. 2, 2012, 6:54 p.m., Gabe Black wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/1024/
> -----------------------------------------------------------
> 
> (Updated Feb. 2, 2012, 6:54 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Description
> -------
> 
> Changeset 8810:a714221c3c44
> ---------------------------
> System: Fix the check which detects running out of physical memory.
> 
> The code that checks whether pages allocated by allocPhysPages only checks
> that the first page fits into physical memory, not that all of them do. This
> change makes the code check the last page which should work properly. This
> function used to only allocate one page at a time, so the first page and last
> page used to be the same thing.
> 
> 
> Diffs
> -----
> 
>   src/sim/system.cc bb10807da889 
> 
> Diff: http://reviews.gem5.org/r/1024/diff/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Gabe Black
> 
>

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

Reply via email to