Skip to content

Commit

Permalink
run GC early in the main function
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Dec 20, 2024
1 parent 500434d commit c8e22f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/util/flavor/flavor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
// Package flavor defines the various flavors of the agent
package flavor

import pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup"
import (
"runtime"

pkgconfigsetup "github.com/DataDog/datadog-agent/pkg/config/setup"
)

const (
// DefaultAgent is the default Agent flavor
Expand Down Expand Up @@ -50,6 +54,7 @@ var agentFlavor = DefaultAgent

// SetFlavor sets the Agent flavor
func SetFlavor(flavor string) {
runtime.GC()
agentFlavor = flavor

if agentFlavor == IotAgent {
Expand Down

0 comments on commit c8e22f8

Please sign in to comment.