MCPcopy Create free account
hub / github.com/buke/quickjs-go / WithMemoryLimit

Function WithMemoryLimit

runtime.go:452–456  ·  view source on GitHub ↗

WithMemoryLimit will set the runtime memory limit; if not set, it will be unlimit.

(memoryLimit uint64)

Source from the content-addressed store, hash-verified

450
451// WithMemoryLimit will set the runtime memory limit; if not set, it will be unlimit.
452func 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.
459func WithGCThreshold(gcThreshold int64) Option {

Callers 3

TestRuntimeBasicsFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestRuntimeBasicsFunction · 0.68