MaxSystemMemoryBytesPerStorage 计算单个策略能使用的系统最大内存
()
| 294 | |
| 295 | // MaxSystemMemoryBytesPerStorage 计算单个策略能使用的系统最大内存 |
| 296 | func (this *Manager) MaxSystemMemoryBytesPerStorage() int64 { |
| 297 | var count = this.CountMemoryStorages |
| 298 | if count < 1 { |
| 299 | count = 1 |
| 300 | } |
| 301 | |
| 302 | var resultBytes = int64(memutils.SystemMemoryBytes()) / 3 / int64(count) // 1/3 of the system memory |
| 303 | if resultBytes < 1<<30 { |
| 304 | resultBytes = 1 << 30 |
| 305 | } |
| 306 | return resultBytes |
| 307 | } |
no outgoing calls