We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61b6ac4 commit 9cf04d5Copy full SHA for 9cf04d5
pkg/sql/colexec/colexecargs/monitor_registry.go
@@ -167,9 +167,10 @@ func (r *MonitorRegistry) createUnlimitedMemAccountsLocked(
167
)
168
r.monitors = append(r.monitors, bufferingOpUnlimitedMemMonitor)
169
oldLen := len(r.accounts)
170
- for i := 0; i < numAccounts; i++ {
171
- acc := bufferingOpUnlimitedMemMonitor.MakeBoundAccount()
172
- r.accounts = append(r.accounts, &acc)
+ newAccounts := make([]mon.BoundAccount, numAccounts)
+ for i := range newAccounts {
+ newAccounts[i] = bufferingOpUnlimitedMemMonitor.MakeBoundAccount()
173
+ r.accounts = append(r.accounts, &newAccounts[i])
174
}
175
return bufferingOpUnlimitedMemMonitor, r.accounts[oldLen:len(r.accounts)]
176
0 commit comments