getMemoryLimit returns the configured memory limit
()
| 174 | |
| 175 | // getMemoryLimit returns the configured memory limit |
| 176 | func (b *Buffer) getMemoryLimit() int64 { |
| 177 | b.mu.RLock() |
| 178 | defer b.mu.RUnlock() |
| 179 | return b.maxMemory |
| 180 | } |
| 181 | |
| 182 | // setMemoryLimit sets the maximum memory limit in bytes (0 = no limit) |
| 183 | func (b *Buffer) setMemoryLimit(bytes int64) { |
no outgoing calls