Commit 77d6ef38 authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] ObjectStats: Fix off-by-one in histogram

BUG=chromium:631094
R=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2181373002
Cr-Commit-Position: refs/heads/master@{#38067}
parent f91727d1
......@@ -94,7 +94,7 @@ class ObjectStats {
static const int kLastBucketShift = 19; // >512k
static const int kFirstBucket = 1 << kFirstBucketShift;
static const int kLastBucket = 1 << kLastBucketShift;
static const int kNumberOfBuckets = kLastBucketShift - kFirstBucketShift;
static const int kNumberOfBuckets = kLastBucketShift - kFirstBucketShift + 1;
int HistogramIndexFromSize(size_t size) {
if (size == 0) return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment