malloc limits the cap of the buffer from mcache.
(size, capacity int)
| 269 | |
| 270 | // malloc limits the cap of the buffer from mcache. |
| 271 | func malloc(size, capacity int) []byte { |
| 272 | if capacity > mallocMax { |
| 273 | return dirtmake.Bytes(size, capacity) |
| 274 | } |
| 275 | return mcache.Malloc(size, capacity) |
| 276 | } |
| 277 | |
| 278 | // free limits the cap of the buffer from mcache. |
| 279 | func free(buf []byte) { |
no test coverage detected
searching dependent graphs…