We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88fc739 commit cec0bf8Copy full SHA for cec0bf8
1 file changed
src/butil/gpu/gpu_block_pool.cpp
@@ -298,7 +298,7 @@ void BlockPoolAllocator::extendRegion() {
298
int64_t aligned_bytes = REGION_SIZE;
299
if (ptr != aligned_ptr) {
300
uintptr_t region_end = uintptr_t(ptr) + REGION_SIZE;
301
- uintptr_t aligned_end_ptr = (region_end + alignment - 1) & ~(alignment - 1);
+ uintptr_t aligned_end_ptr = region_end & ~(alignment - 1);
302
aligned_bytes = uintptr_t(aligned_end_ptr) - uintptr_t(aligned_ptr);
303
LOG(WARNING) << "addr is not aligned with 4096: " << ptr << ", aligned_bytes: " << aligned_bytes
304
<< ", region_size: " << REGION_SIZE;
0 commit comments