diff --git a/metrics/cgroups/oom.go b/metrics/cgroups/oom.go index 5a91becb3..196c8fb07 100644 --- a/metrics/cgroups/oom.go +++ b/metrics/cgroups/oom.go @@ -44,11 +44,14 @@ type oomCollector struct { } type oom struct { + // count needs to stay the first member of this struct to ensure 64bits + // alignment on a 32bits machine (e.g. arm32). This is necessary as we use + // the sync/atomic operations on this field. + count int64 id string namespace string c cgroups.Cgroup triggers []Trigger - count int64 } func (o *oomCollector) Add(id, namespace string, cg cgroups.Cgroup, triggers ...Trigger) error {