Skip to content

Commit cec0bf8

Browse files
committed
fix align
1 parent 88fc739 commit cec0bf8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/butil/gpu/gpu_block_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void BlockPoolAllocator::extendRegion() {
298298
int64_t aligned_bytes = REGION_SIZE;
299299
if (ptr != aligned_ptr) {
300300
uintptr_t region_end = uintptr_t(ptr) + REGION_SIZE;
301-
uintptr_t aligned_end_ptr = (region_end + alignment - 1) & ~(alignment - 1);
301+
uintptr_t aligned_end_ptr = region_end & ~(alignment - 1);
302302
aligned_bytes = uintptr_t(aligned_end_ptr) - uintptr_t(aligned_ptr);
303303
LOG(WARNING) << "addr is not aligned with 4096: " << ptr << ", aligned_bytes: " << aligned_bytes
304304
<< ", region_size: " << REGION_SIZE;

0 commit comments

Comments
 (0)