MCPcopy
hub / github.com/google/gvisor / Merge

Method Merge

pkg/segment/set.go:87–87  ·  view source on GitHub ↗

Merge attempts to merge the values corresponding to two consecutive segments. If successful, Merge returns (merged value, true). Otherwise, it returns (unspecified, false). Preconditions: r1.End == r2.Start. Postconditions: If merging succeeds, val1 and val2 are invalidated.

(r1 Range, val1 Value, r2 Range, val2 Value)

Source from the content-addressed store, hash-verified

85 //
86 // Postconditions: If merging succeeds, val1 and val2 are invalidated.
87 Merge(r1 Range, val1 Value, r2 Range, val2 Value) (Value, bool)
88
89 // Split splits a segment's value at a key within its range, such that the
90 // first returned value corresponds to the range [r.Start, split) and the

Callers 15

mergeProfilesFunction · 0.65
SeccompInfoMethod · 0.65
SyscallFiltersMethod · 0.65
writeFrameMethod · 0.65
getPMAsInternalLockedMethod · 0.65
cloneMethod · 0.65
InsertMethod · 0.65
MergeUncheckedMethod · 0.65
TestMergeFunction · 0.65
XXX_MergeMethod · 0.65
mergeMethod · 0.65
returnErrorMethod · 0.65

Implementers 15

devAddrSetFuncspkg/sentry/devices/tpuproxy/accel/acce
devAddrSetFuncspkg/sentry/devices/tpuproxy/vfio/tpu_f
lockSetFunctionspkg/sentry/fsimpl/lock/lock_set_functi
aplUnloadedSetFunctionspkg/sentry/pgalloc/save_restore.go
unwasteSetFunctionspkg/sentry/pgalloc/pgalloc.go
unfreeSetFunctionspkg/sentry/pgalloc/pgalloc.go
memAcctSetFunctionspkg/sentry/pgalloc/pgalloc.go
evictableRangeSetFunctionspkg/sentry/pgalloc/pgalloc.go
syntheticTimerSetFunctionspkg/sentry/ktime/synthetic_timer.go
pmaSetFunctionspkg/sentry/mm/pma.go
vmaSetFunctionspkg/sentry/mm/vma.go
mappingSetFunctionspkg/sentry/memmap/mapping_set.go

Calls

no outgoing calls

Tested by 3

cloneMethod · 0.52
TestMergeFunction · 0.52
TestPacketBufferDataFunction · 0.52