Merge pull request #1642 from mlaventure/arm-panic
linux: Ensure count is 64bits aligned for proper atomic use on 32bits machines
This commit is contained in:
commit
7562047f6a
@ -44,11 +44,14 @@ type oomCollector struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type oom 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
|
id string
|
||||||
namespace string
|
namespace string
|
||||||
c cgroups.Cgroup
|
c cgroups.Cgroup
|
||||||
triggers []Trigger
|
triggers []Trigger
|
||||||
count int64
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *oomCollector) Add(id, namespace string, cg cgroups.Cgroup, triggers ...Trigger) error {
|
func (o *oomCollector) Add(id, namespace string, cg cgroups.Cgroup, triggers ...Trigger) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user