You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
In Line 222 (see this) of UserProcess.java, the if condition checks i > pageTable.length. This is problematic because all of these things are zero-indexed. i refers to the exact page number that directly maps to the pageTable array indices. So the largest valid value of i would be pageTable.length - 1, not pageTable.length. The if condition allows i to reach pageTable.length and that could potentially result in an error.
Please correct me if I am incorrect in my understanding of the code.
The text was updated successfully, but these errors were encountered:
In Line 222 (see this) of UserProcess.java, the if condition checks
i > pageTable.length
. This is problematic because all of these things are zero-indexed.i refers to the exact page number that directly maps to the pageTable array indices. So the largest valid value of i would be pageTable.length - 1, not pageTable.length. The if condition allows i to reach pageTable.length and that could potentially result in an error.
Please correct me if I am incorrect in my understanding of the code.
The text was updated successfully, but these errors were encountered: