1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 02:23:24 +00:00

fs/asyncreader: optionally user mmap for memory allocation with --use-mmap #2200

This replaces the `sync.Pool` allocator with lib/pool.  This
implements a pool of buffers of up to 64MB which can be re-used but is
flushed every 5 seconds.

If `--use-mmap` is set then rclone will use mmap for memory
allocations which is much better at returning memory to the OS.
This commit is contained in:
Nick Craig-Wood
2018-05-22 14:48:23 +01:00
parent bed2971bf0
commit eb91356e28
4 changed files with 40 additions and 24 deletions

View File

@@ -86,6 +86,7 @@ type ConfigInfo struct {
StatsOneLine bool
Progress bool
Cookie bool
UseMmap bool
}
// NewConfig creates a new config with everything set to the default