MCPcopy Index your code
hub / github.com/google/gvisor / allocStack

Function allocStack

pkg/sentry/loader/loader.go:158–164  ·  view source on GitHub ↗

allocStack allocates and maps a stack in to any available part of the address space.

(ctx context.Context, m *mm.MemoryManager, a *arch.Context64)

Source from the content-addressed store, hash-verified

156
157// allocStack allocates and maps a stack in to any available part of the address space.
158func allocStack(ctx context.Context, m *mm.MemoryManager, a *arch.Context64) (*arch.Stack, error) {
159 ar, err := m.MapStack(ctx)
160 if err != nil {
161 return nil, err
162 }
163 return &arch.Stack{Arch: a, IO: m, Bottom: ar.End}, nil
164}
165
166const (
167 // maxLoaderAttempts is the maximum number of attempts to try to load

Callers 1

LoadFunction · 0.85

Calls 1

MapStackMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…