commit | 96a9ec31911eb534975c59901ca4b05e475cc681 | [log] [tgz] |
---|---|---|
author | Chris Palmer <palmer@chromium.org> | Tue May 14 00:40:43 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue May 14 00:40:43 2019 |
tree | f52e1172c429dcddf65f09e1a84e0a64d3e1adbf | |
parent | 5e7c7098af99e1e51d01bab6dd38cdbfe1e1358e [diff] |
Add simple correctness checks to PartitionAlloc. ajwong pointed out that `PartitionRootBase::max_allocation` was used only in tests. This CL additionally `DCHECK`s that it is not being mis-used in the most simple ways. In the future, we might be able to change the API such that `SizeSpecificPartitionAllocator` 'knows' its allocation size and just allocates it, without needing a `size` parameter. This CL also does some code cleanup. This involved making sure we always observe `PartitionAllocReturnNull` in every case where `MEMORY_TOOL_REPLACES_ALLOCATOR` is defined; previously we did not. Bug: None Change-Id: I04aa797176851e15ef3a0b803b85ddd038e0f772 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1607149 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Albert J. Wong <ajwong@chromium.org> Commit-Queue: Chris Palmer <palmer@chromium.org> Cr-Commit-Position: refs/heads/master@{#659314}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .