[archiver] Try to configure runtime to limit resource consumption.
This commit is contained in:
parent
14183379b6
commit
16cd43ab8b
1 changed files with 8 additions and 1 deletions
|
@ -11,8 +11,10 @@ import "io"
|
||||||
import "io/ioutil"
|
import "io/ioutil"
|
||||||
import "log"
|
import "log"
|
||||||
import "net/http"
|
import "net/http"
|
||||||
import "path/filepath"
|
|
||||||
import "os"
|
import "os"
|
||||||
|
import "path/filepath"
|
||||||
|
import "runtime"
|
||||||
|
import "runtime/debug"
|
||||||
import "sort"
|
import "sort"
|
||||||
import "strings"
|
import "strings"
|
||||||
import "syscall"
|
import "syscall"
|
||||||
|
@ -925,6 +927,11 @@ func walkPath (_context *context, _pathResolved string, _pathInArchive string, _
|
||||||
|
|
||||||
|
|
||||||
func Main () () {
|
func Main () () {
|
||||||
|
|
||||||
|
runtime.GOMAXPROCS (2)
|
||||||
|
debug.SetGCPercent (75)
|
||||||
|
debug.SetMaxThreads (8)
|
||||||
|
|
||||||
Main_0 (main_0)
|
Main_0 (main_0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue