diff options
author | 2023-07-14 17:35:06 +0100 | |
---|---|---|
committer | 2023-11-28 19:12:26 +0000 | |
commit | f1e9e38c0652fbe0cec16b520599f2fef53a38c1 (patch) | |
tree | 228a0ec3f3cee41505eb940c4550ef26c388861b /runtime/gc/allocator/rosalloc.h | |
parent | ca01707ad2b9ef68ae45e22837437b4f69f25ce9 (diff) |
Use CHECK_ALIGNED_PARAM for variable page size
This patch is part of the chain preparing for making kPageSize
non-constexpr in a future patch.
Since kPageSize is going to be a non-constexpr value, it can't be a
template parameter anymore. Consequently CHECK_ALIGNED(..., kPageSize),
expressions implemented via a template function IsAligned<>, have to be
replaced with CHECK_ALIGNED_PARAM(..., kPageSize).
Same is done for DCHECK_ALIGNED.
Test: Same as for I5430741a8494b340ed7fd2d8692c41a59ad9c530.
The whole patches chain was tested as a whole.
Change-Id: I0e634dab62f2b44d078d7199d5b5feab945077b9
Diffstat (limited to 'runtime/gc/allocator/rosalloc.h')
-rw-r--r-- | runtime/gc/allocator/rosalloc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h index bb2f426aef..a9007f226f 100644 --- a/runtime/gc/allocator/rosalloc.h +++ b/runtime/gc/allocator/rosalloc.h @@ -56,7 +56,7 @@ class RosAlloc { size_t pm_idx = rosalloc->ToPageMapIndex(fpr_base); size_t byte_size = rosalloc->free_page_run_size_map_[pm_idx]; DCHECK_GE(byte_size, static_cast<size_t>(0)); - DCHECK_ALIGNED(byte_size, kPageSize); + DCHECK_ALIGNED_PARAM(byte_size, kPageSize); return byte_size; } void SetByteSize(RosAlloc* rosalloc, size_t byte_size) |