1
mirror of https://github.com/rclone/rclone synced 2024-11-25 02:47:14 +01:00

multipart: make pool buffer size public

This commit is contained in:
Nick Craig-Wood 2024-03-13 16:34:42 +00:00
parent 5f66350331
commit e686e34f89

View File

@ -17,7 +17,7 @@ import (
)
const (
bufferSize = 1024 * 1024 // default size of the pages used in the reader
BufferSize = 1024 * 1024 // BufferSize is the default size of the pages used in the reader
bufferCacheSize = 64 // max number of buffers to keep in cache
bufferCacheFlushTime = 5 * time.Second // flush the cached buffers after this long
)
@ -33,7 +33,7 @@ func getPool() *pool.Pool {
bufferPoolOnce.Do(func() {
ci := fs.GetConfig(context.Background())
// Initialise the buffer pool when used
bufferPool = pool.New(bufferCacheFlushTime, bufferSize, bufferCacheSize, ci.UseMmap)
bufferPool = pool.New(bufferCacheFlushTime, BufferSize, bufferCacheSize, ci.UseMmap)
})
return bufferPool
}