File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/04kernel/src/allocators Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ namespace refactor::kernel {
2323 std::vector<runtime::Edge> edges_ (edges.size (), {nullptr , SIZE_MAX});
2424 for (auto [nodeIdx, inputs, outputs] : topology) {
2525 for (auto outputIdx : outputs) {
26- if (!edgeRc[outputIdx]) { continue ; }
2726 if (globalOutputs.contains (outputIdx)) {
2827 edges_[outputIdx].stackOffset --;
2928 } else {
@@ -34,6 +33,11 @@ namespace refactor::kernel {
3433 auto wsSize = node.workspaceOffset ;
3534 calculator.free (node.workspaceOffset = calculator.alloc (wsSize), wsSize);
3635 }
36+ for (auto outputIdx : outputs) {
37+ if (!edgeRc[outputIdx]) {
38+ calculator.free (edges_[outputIdx].stackOffset , edges[outputIdx].size );
39+ }
40+ }
3741 for (auto inputIdx : inputs) {
3842 ASSERT (edgeRc[inputIdx], " double free" );
3943 if (!--edgeRc[inputIdx]) {
You can’t perform that action at this time.
0 commit comments