Skip to content

Commit 1a9b121

Browse files
authored
chore: Correct memory acquired size in unified memory pool (apache#1738)
Although the `acquired` is always equal to the `additional` due to the current implicit semantics, it’s still better to make this logic explicit for clarity and better maintainability.
1 parent 5866561 commit 1a9b121

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

native/core/src/execution/memory_pools/unified_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl MemoryPool for CometMemoryPool {
115115
self.reserved()
116116
));
117117
}
118-
self.used.fetch_add(additional, Relaxed);
118+
self.used.fetch_add(acquired as usize, Relaxed);
119119
}
120120
Ok(())
121121
}

0 commit comments

Comments
 (0)