-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mechanism to track currently-dirtiest region. #361
base: master
Are you sure you want to change the base?
Conversation
47f5af4
to
8dc7f99
Compare
freeRun(addresses[0 .. 2]); | ||
assert(regionAllocator.dirtyBlockCount == 11); | ||
verifyUniqueRegion(addresses[0], 2, 2, 2); | ||
verifyDirtiestRegion(addresses[10], 5, 5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the order changed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved it so as to test the region at addresses[10]
remaining the longest dirty region at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needed a case where a region is freed, but the currently-dirtiest region does not change. The re-ordering gives this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's generally better to add new tests cases for what we want to test, as it prove none of the existing things are broken. Nevertheless, I get it now.
That being said, it seems that every single call to verifyUniqueRegion
is now followed by a call to verifyDirtiestRegion
. Then why have two functions?
4acd1ab
to
e854d3d
Compare
0896895
to
5a79292
Compare
7ce40a5
to
4dbe602
Compare
Part 1 of 2 to resolve #270 .