System: Fix the check which detects running out of physical memory.
Review Request #1024 - Created Feb. 2, 2012 and submitted
| Information | |
|---|---|
| Gabe Black | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
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.
Issue Summary
1
1
0
0
| Description | From | Last Updated | Status |
|---|---|---|---|
| Don't you want to multiply npages by the page size? Or better yet, wouldn't if (pagePtr > physmem->size()) work? (note ... | Steve Reinhardt | Feb. 2, 2012, 11:07 a.m. | Open |
Posted (Feb. 2, 2012, 11:07 a.m.)
-
src/sim/system.cc (Diff revision 1) -
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.
