This is an automated email from the ASF dual-hosted git repository.
wangzhen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new a69c45512d [GLUTEN-10279][VL] Reset reserved counter when
allocationChanged fails (#10280)
a69c45512d is described below
commit a69c45512d2eaadaa3a4f385f8e0154c3c09fca1
Author: Zhen Wang <[email protected]>
AuthorDate: Wed Jul 30 16:35:36 2025 +0800
[GLUTEN-10279][VL] Reset reserved counter when allocationChanged fails
(#10280)
---
cpp/core/memory/AllocationListener.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/cpp/core/memory/AllocationListener.h
b/cpp/core/memory/AllocationListener.h
index 1751b6112a..dd819b59e6 100644
--- a/cpp/core/memory/AllocationListener.h
+++ b/cpp/core/memory/AllocationListener.h
@@ -59,7 +59,12 @@ class BlockAllocationListener final : public
AllocationListener {
if (granted == 0) {
return;
}
- delegated_->allocationChanged(granted);
+ try {
+ delegated_->allocationChanged(granted);
+ } catch (const std::exception&) {
+ reserve(-diff);
+ throw;
+ }
}
int64_t currentBytes() override {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]