Commit 05c3b4c
committed
fix: Add parameter validation for zero and negative memory sizes
- Add early return in releaseToQuery when sizeInBytes <= 0 to avoid unnecessary operations
- Add validation in allocateMemoryBlock to reject zero or negative sizes
- Add validation in forceResize to reject negative sizes
- These checks prevent invalid parameters that could cause incorrect memory operations1 parent 85dfc89 commit 05c3b4c
File tree
1 file changed
+11
-0
lines changed- iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory
1 file changed
+11
-0
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| |||
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
| |||
0 commit comments