• ofrobots's avatar
    [heap] make inline allocation step size dynamic · f5836617
    ofrobots authored
    Presently the inline allocation step is a static value defined to be the minimum
    of the step sizes over all the observers. The step occur every (approx.) step
    byte. This is unfair to observers whose steps are not evenly divisible by the
    min step size. For example, consider two observers with steps sizes of 512 and
    576 bytes. Across 16kb allocated, you would expect the first observer to be hit
    approximately 32 times, and the second observer to be hit approximately 28
    times.
    
    In reality, the observers get notified 30 and 15 times respectively. The reason
    is that each step is 512 bytes, and since 576 is not evenly divisible by 512,
    it gets notified much less frequently.
    
    This CL fixes the problem by making the next step size be the minimum (over all
    observers) of the remaining bytes to get to the step, making the steps fair.
    
    BUG=
    R=hpayer@chromium.org,ulan@chromium.org
    
    Review URL: https://codereview.chromium.org/1427973006
    
    Cr-Commit-Position: refs/heads/master@{#31948}
    f5836617
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
docs Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...