Handle zero-size allocations properly in heap profiler

Now zero-size allocations are ignored for heap profiling.
Percentage calculation is originally changed to avoid div-by-zero,
but it also solves integer overflow issue with >32768 Kb allocations
on platforms with 32-bit size_t.

Review URL: https://codereview.chromium.org/1859143003

Cr-Commit-Position: refs/heads/master@{#385426}


CrOS-Libchrome-Original-Commit: a29434e19fa91646e9c40afa5078e64e0ae73903
3 files changed
tree: c2236494a34971938aa43fbe2fd994858b016dc3
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/