Skip to content

Commit

Permalink
feat(arm support): Adjusting CGROUP_VAL_MAX for 32 bits
Browse files Browse the repository at this point in the history
In order to work for 32 bit we are using a long long.
Tested on armv6 and armv7 chips.

Signed-off-by: Kris Nova <[email protected]>
  • Loading branch information
krisnova authored and gnosek committed May 1, 2020
1 parent 47374b2 commit c4af1a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userspace/libsinsp/cgroup_limits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace {
// This reports extremely large values (e.g. almost-but-not-quite 9EiB as set by k8s) as unlimited.
// Note: we use the same maximum value for cpu shares/quotas as well; the typical values are much lower
// and so should never exceed CGROUP_VAL_MAX either
constexpr const int64_t CGROUP_VAL_MAX = (1UL << 42u) - 1;
constexpr const int64_t CGROUP_VAL_MAX = (1ULL << 42u) - 1;

/**
* \brief Read a single int64_t value from cgroupfs
Expand Down

0 comments on commit c4af1a9

Please sign in to comment.