Skip to content

Document return value of uv_get_constrained_memory if no limit is set. - #3753

Merged
vtjnash merged 1 commit into
libuv:v1.xfrom
maleadt:constrained_memory
May 12, 2023
Merged

vtjnash merged 1 commit into
libuv:v1.xfrom
maleadt:constrained_memory

Conversation

@maleadt

@maleadt maleadt commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

Document that we return UINT64_MAX if the cgroup limit is set to the
max. For cgroupv2, that happens if we encounter max, while cgroupv1
returns 9223372036854771712 when no limit is set (which according to
this StackExchange discussion is derived from LONG_MAX and
PAGE_SIZE). So make sure we also detect this case for cgroupv1.

Addresses: https://github.com/libuv/libuv/pull/3744/files#r974062912

@maleadt
maleadt force-pushed the constrained_memory branch 2 times, most recently from d363de5 to 69bbc27 Compare September 22, 2022 12:22
@maleadt maleadt changed the title Fix the returned value of constrained memory getters. Document return value of uv_get_constrained_memory if no limit is set. Sep 22, 2022
@maleadt
maleadt force-pushed the constrained_memory branch from 69bbc27 to 4fb16e1 Compare October 26, 2022 10:16
@maleadt

maleadt commented Oct 26, 2022

Copy link
Copy Markdown
Contributor Author

Rebased on top of #3754, but apparently I can't change the base to my fork.

@bnoordhuis Is this something we want? It seems useful to document what we currently return already for cgroup2's "max" (and make sure we do the same for cgroup1).

@maleadt
maleadt force-pushed the constrained_memory branch 2 times, most recently from f6cfa45 to d4928c4 Compare October 26, 2022 15:19
Comment thread src/unix/linux.c Outdated
@maleadt
maleadt force-pushed the constrained_memory branch from a409cb0 to ccda323 Compare January 18, 2023 12:58
Comment thread src/unix/linux.c Outdated
Also make sure we detect this case for cgroupv1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants