// automatically generated by stateify. package pgalloc import ( "gvisor.dev/gvisor/pkg/state" ) func (e *EvictableRange) StateTypeName() string { return "pkg/sentry/pgalloc.EvictableRange" } func (e *EvictableRange) StateFields() []string { return []string{ "Start", "End", } } func (e *EvictableRange) beforeSave() {} func (e *EvictableRange) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.Start) stateSinkObject.Save(1, &e.End) } func (e *EvictableRange) afterLoad() {} func (e *EvictableRange) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.Start) stateSourceObject.Load(1, &e.End) } func (e *evictableRangeSet) StateTypeName() string { return "pkg/sentry/pgalloc.evictableRangeSet" } func (e *evictableRangeSet) StateFields() []string { return []string{ "root", } } func (e *evictableRangeSet) beforeSave() {} func (e *evictableRangeSet) StateSave(stateSinkObject state.Sink) { e.beforeSave() var rootValue *evictableRangeSegmentDataSlices = e.saveRoot() stateSinkObject.SaveValue(0, rootValue) } func (e *evictableRangeSet) afterLoad() {} func (e *evictableRangeSet) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadValue(0, new(*evictableRangeSegmentDataSlices), func(y interface{}) { e.loadRoot(y.(*evictableRangeSegmentDataSlices)) }) } func (e *evictableRangenode) StateTypeName() string { return "pkg/sentry/pgalloc.evictableRangenode" } func (e *evictableRangenode) StateFields() []string { return []string{ "nrSegments", "parent", "parentIndex", "hasChildren", "maxGap", "keys", "values", "children", } } func (e *evictableRangenode) beforeSave() {} func (e *evictableRangenode) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.nrSegments) stateSinkObject.Save(1, &e.parent) stateSinkObject.Save(2, &e.parentIndex) stateSinkObject.Save(3, &e.hasChildren) stateSinkObject.Save(4, &e.maxGap) stateSinkObject.Save(5, &e.keys) stateSinkObject.Save(6, &e.values) stateSinkObject.Save(7, &e.children) } func (e *evictableRangenode) afterLoad() {} func (e *evictableRangenode) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.nrSegments) stateSourceObject.Load(1, &e.parent) stateSourceObject.Load(2, &e.parentIndex) stateSourceObject.Load(3, &e.hasChildren) stateSourceObject.Load(4, &e.maxGap) stateSourceObject.Load(5, &e.keys) stateSourceObject.Load(6, &e.values) stateSourceObject.Load(7, &e.children) } func (e *evictableRangeSegmentDataSlices) StateTypeName() string { return "pkg/sentry/pgalloc.evictableRangeSegmentDataSlices" } func (e *evictableRangeSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", "Values", } } func (e *evictableRangeSegmentDataSlices) beforeSave() {} func (e *evictableRangeSegmentDataSlices) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.Start) stateSinkObject.Save(1, &e.End) stateSinkObject.Save(2, &e.Values) } func (e *evictableRangeSegmentDataSlices) afterLoad() {} func (e *evictableRangeSegmentDataSlices) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.Start) stateSourceObject.Load(1, &e.End) stateSourceObject.Load(2, &e.Values) } func (u *usageInfo) StateTypeName() string { return "pkg/sentry/pgalloc.usageInfo" } func (u *usageInfo) StateFields() []string { return []string{ "kind", "knownCommitted", "refs", } } func (u *usageInfo) beforeSave() {} func (u *usageInfo) StateSave(stateSinkObject state.Sink) { u.beforeSave() stateSinkObject.Save(0, &u.kind) stateSinkObject.Save(1, &u.knownCommitted) stateSinkObject.Save(2, &u.refs) } func (u *usageInfo) afterLoad() {} func (u *usageInfo) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &u.kind) stateSourceObject.Load(1, &u.knownCommitted) stateSourceObject.Load(2, &u.refs) } func (r *reclaimSet) StateTypeName() string { return "pkg/sentry/pgalloc.reclaimSet" } func (r *reclaimSet) StateFields() []string { return []string{ "root", } } func (r *reclaimSet) beforeSave() {} func (r *reclaimSet) StateSave(stateSinkObject state.Sink) { r.beforeSave() var rootValue *reclaimSegmentDataSlices = r.saveRoot() stateSinkObject.SaveValue(0, rootValue) } func (r *reclaimSet) afterLoad() {} func (r *reclaimSet) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadValue(0, new(*reclaimSegmentDataSlices), func(y interface{}) { r.loadRoot(y.(*reclaimSegmentDataSlices)) }) } func (r *reclaimnode) StateTypeName() string { return "pkg/sentry/pgalloc.reclaimnode" } func (r *reclaimnode) StateFields() []string { return []string{ "nrSegments", "parent", "parentIndex", "hasChildren", "maxGap", "keys", "values", "children", } } func (r *reclaimnode) beforeSave() {} func (r *reclaimnode) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.nrSegments) stateSinkObject.Save(1, &r.parent) stateSinkObject.Save(2, &r.parentIndex) stateSinkObject.Save(3, &r.hasChildren) stateSinkObject.Save(4, &r.maxGap) stateSinkObject.Save(5, &r.keys) stateSinkObject.Save(6, &r.values) stateSinkObject.Save(7, &r.children) } func (r *reclaimnode) afterLoad() {} func (r *reclaimnode) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.nrSegments) stateSourceObject.Load(1, &r.parent) stateSourceObject.Load(2, &r.parentIndex) stateSourceObject.Load(3, &r.hasChildren) stateSourceObject.Load(4, &r.maxGap) stateSourceObject.Load(5, &r.keys) stateSourceObject.Load(6, &r.values) stateSourceObject.Load(7, &r.children) } func (r *reclaimSegmentDataSlices) StateTypeName() string { return "pkg/sentry/pgalloc.reclaimSegmentDataSlices" } func (r *reclaimSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", "Values", } } func (r *reclaimSegmentDataSlices) beforeSave() {} func (r *reclaimSegmentDataSlices) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.Start) stateSinkObject.Save(1, &r.End) stateSinkObject.Save(2, &r.Values) } func (r *reclaimSegmentDataSlices) afterLoad() {} func (r *reclaimSegmentDataSlices) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.Start) stateSourceObject.Load(1, &r.End) stateSourceObject.Load(2, &r.Values) } func (u *usageSet) StateTypeName() string { return "pkg/sentry/pgalloc.usageSet" } func (u *usageSet) StateFields() []string { return []string{ "root", } } func (u *usageSet) beforeSave() {} func (u *usageSet) StateSave(stateSinkObject state.Sink) { u.beforeSave() var rootValue *usageSegmentDataSlices = u.saveRoot() stateSinkObject.SaveValue(0, rootValue) } func (u *usageSet) afterLoad() {} func (u *usageSet) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadValue(0, new(*usageSegmentDataSlices), func(y interface{}) { u.loadRoot(y.(*usageSegmentDataSlices)) }) } func (u *usagenode) StateTypeName() string { return "pkg/sentry/pgalloc.usagenode" } func (u *usagenode) StateFields() []string { return []string{ "nrSegments", "parent", "parentIndex", "hasChildren", "maxGap", "keys", "values", "children", } } func (u *usagenode) beforeSave() {} func (u *usagenode) StateSave(stateSinkObject state.Sink) { u.beforeSave() stateSinkObject.Save(0, &u.nrSegments) stateSinkObject.Save(1, &u.parent) stateSinkObject.Save(2, &u.parentIndex) stateSinkObject.Save(3, &u.hasChildren) stateSinkObject.Save(4, &u.maxGap) stateSinkObject.Save(5, &u.keys) stateSinkObject.Save(6, &u.values) stateSinkObject.Save(7, &u.children) } func (u *usagenode) afterLoad() {} func (u *usagenode) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &u.nrSegments) stateSourceObject.Load(1, &u.parent) stateSourceObject.Load(2, &u.parentIndex) stateSourceObject.Load(3, &u.hasChildren) stateSourceObject.Load(4, &u.maxGap) stateSourceObject.Load(5, &u.keys) stateSourceObject.Load(6, &u.values) stateSourceObject.Load(7, &u.children) } func (u *usageSegmentDataSlices) StateTypeName() string { return "pkg/sentry/pgalloc.usageSegmentDataSlices" } func (u *usageSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", "Values", } } func (u *usageSegmentDataSlices) beforeSave() {} func (u *usageSegmentDataSlices) StateSave(stateSinkObject state.Sink) { u.beforeSave() stateSinkObject.Save(0, &u.Start) stateSinkObject.Save(1, &u.End) stateSinkObject.Save(2, &u.Values) } func (u *usageSegmentDataSlices) afterLoad() {} func (u *usageSegmentDataSlices) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &u.Start) stateSourceObject.Load(1, &u.End) stateSourceObject.Load(2, &u.Values) } func init() { state.Register((*EvictableRange)(nil)) state.Register((*evictableRangeSet)(nil)) state.Register((*evictableRangenode)(nil)) state.Register((*evictableRangeSegmentDataSlices)(nil)) state.Register((*usageInfo)(nil)) state.Register((*reclaimSet)(nil)) state.Register((*reclaimnode)(nil)) state.Register((*reclaimSegmentDataSlices)(nil)) state.Register((*usageSet)(nil)) state.Register((*usagenode)(nil)) state.Register((*usageSegmentDataSlices)(nil)) }