WithMemoryLimit will set the runtime memory limit; if not set, it will be unlimit.
(memoryLimit uint64)
| 450 | |
| 451 | // WithMemoryLimit will set the runtime memory limit; if not set, it will be unlimit. |
| 452 | func WithMemoryLimit(memoryLimit uint64) Option { |
| 453 | return func(o *Options) { |
| 454 | o.memoryLimit = memoryLimit |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | // WithGCThreshold will set the runtime's GC threshold; default is -1 to disable automatic GC. |
| 459 | func WithGCThreshold(gcThreshold int64) Option { |
no outgoing calls