setMemoryLimit sets the maximum memory limit in bytes (0 = no limit)
(bytes int64)
| 181 | |
| 182 | // setMemoryLimit sets the maximum memory limit in bytes (0 = no limit) |
| 183 | func (b *Buffer) setMemoryLimit(bytes int64) { |
| 184 | b.mu.Lock() |
| 185 | defer b.mu.Unlock() |
| 186 | b.maxMemory = bytes |
| 187 | } |
| 188 | |
| 189 | // getMemoryStats returns memory usage statistics |
| 190 | func (b *Buffer) getMemoryStats() map[string]interface{} { |
no outgoing calls