// SetProcessOOMScoreAdj sets g.Config.Process.OOMScoreAdj.
549299
func (g *Generator) SetProcessOOMScoreAdj(adj int) {
	g.initConfigProcess()
	g.Config.Process.OOMScoreAdj = &adj
}
572182
func (s *DBSnapshot) SetProcessorFeatures(v []*ProcessorFeature) *DBSnapshot {
	s.ProcessorFeatures = v
	return s
}
914229
func (q *BaseQueue) SetProcessor(processor Processor) {
	q.pmu.Lock()
	defer q.pmu.Unlock()

	q.processor = processor
}
883633
func (s *PutBotInput) SetProcessBehavior(v string) *PutBotInput {
	s.ProcessBehavior = &v
	return s
}
1321536
func (s *RedshiftDestinationConfiguration) SetProcessingConfiguration(v *ProcessingConfiguration) *RedshiftDestinationConfiguration {
	s.ProcessingConfiguration = v
	return s
}
1212764
func (s *DiscoverInputSchemaOutput) SetProcessedInputRecords(v []*string) *DiscoverInputSchemaOutput {
	s.ProcessedInputRecords = v
	return s
}
1094083
func (s *ElasticsearchDestinationConfiguration) SetProcessingConfiguration(v *ProcessingConfiguration) *ElasticsearchDestinationConfiguration {
	s.ProcessingConfiguration = v
	return s
}
26059
func (s *TrustedAdvisorResourcesSummary) SetResourcesProcessed(v int64) *TrustedAdvisorResourcesSummary {
	s.ResourcesProcessed = &v
	return s
}
663651
func (s *SplunkDestinationUpdate) SetProcessingConfiguration(v *ProcessingConfiguration) *SplunkDestinationUpdate {
	s.ProcessingConfiguration = v
	return s
}
1175546
func (s *ImportWorkspaceImageInput) SetIngestionProcess(v string) *ImportWorkspaceImageInput {
	s.IngestionProcess = &v
	return s
}
405727
func (g *Generator) SetProcessConsoleSize(width, height uint) {
	g.initConfigProcessConsoleSize()
	g.Config.Process.ConsoleSize.Width = width
	g.Config.Process.ConsoleSize.Height = height
}
1165787
func (s *GetSamplingTargetsOutput) SetUnprocessedStatistics(v []*UnprocessedStatistics) *GetSamplingTargetsOutput {
	s.UnprocessedStatistics = v
	return s
}
792671
func (s *OrderableDBInstanceOption) SetAvailableProcessorFeatures(v []*AvailableProcessorFeature) *OrderableDBInstanceOption {
	s.AvailableProcessorFeatures = v
	return s
}
1120415
func (s *Result) SetProcessingResult(v string) *Result {
	s.ProcessingResult = &v
	return s
}
558779
func (s *Group) SetSuspendedProcesses(v []*SuspendedProcess) *Group {
	s.SuspendedProcesses = v
	return s
}
183165
func (s *CoreDefinitionVersion) SetCores(v []*Core) *CoreDefinitionVersion {
	s.Cores = v
	return s
}
1361426
func applyOOMScoreAdj(pid int, oomScoreAdj int) error {
	if pid < 0 {
		return fmt.Errorf("invalid PID %d specified for oom_score_adj", pid)
	}

	var pidStr string
	if pid == 0 {
		pidStr = "self"
	} else {
		pidStr = strconv.Itoa(pid)
	}

	oomScoreAdjPath := path.Join("/proc", pidStr, "oom_score_adj")
	maxTries := 2
	var err error
	for i := 0; i < maxTries; i++ {
		_, readErr := ioutil.ReadFile(oomScoreAdjPath)
		if readErr != nil {
			err = fmt.Errorf("failed to read oom_score_adj: %v", readErr)
		} else if writeErr := ioutil.WriteFile(oomScoreAdjPath, []byte(strconv.Itoa(oomScoreAdj)), 0700); writeErr != nil {
			err = fmt.Errorf("failed to set oom_score_adj to %d: %v", oomScoreAdj, writeErr)
		} else {
			return nil
		}
	}

	return err
}