New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776537 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

PartitionAlloc PartitionBucketNumSystemPages() calculation may not interact well with PartitionBucketPartitionPages()

Project Member Reported by ajwong@chromium.org, Oct 19 2017

Issue description

The PartitionBucketNumSystemPages() seems odd in general especially in the way its results are consumed by PartitionBucketPartitionPages().

The calculation logic isn't super clear as to what it's doing and if it's correctly accounting for PTEs or what.

It's also odd that the main user seems to talk in units of PartitionPages where this function returns SystemPages. This causes an odd rounding in PartitionBucketPartitionPages() that may or may not undo part of the logic in this function.

Resolving this bug should be done by some subset of:
  (a) Adding in clarifying comments
  (b) Making everything use the same units
  (c) Removing this function if it's unnecessary
  (d) Fixing the PTE accounting logic.

 

Comment 1 by ajwong@chromium.org, Oct 19 2017

Also, there is a weird DCHECK(!(size % kSystemPageSize)) that doesn't make sense and an odd CHECK(best_pages < (1 << 8)) that appears to be asserting a numeric_limit...
Status: Assigned (was: Untriaged)

Sign in to add a comment