Printing the value of an unlimited docker container I get the value 9223372036854771712 which is 0x7FFFFFFFFFFFF000 (this is the same value of the XUbuntu Host machine). I couldn't find a reference that this is the Docker or Linux default value indicating an unlimited memory resource.

Where does this value come from? Is it different between Container Virtualizations or Linux Distributions/Bitnesses?

2 Answers 2


The value comes from the cgroup setup in the memory management layer; by default, it’s set to PAGE_COUNTER_MAX, which is LONG_MAX / PAGE_SIZE on 64-bit platforms, and multiplied by PAGE_SIZE again when read.

This confirms ilkkachu’s explanation: the value is the maximum 64-bit signed integer, rounded to the nearest page (by dropping the last bits).


That's the highest positive signed 64-bit integer (263-1), rounded down to multiples of 4096 (212), the most common page size on x86 systems. It would seem difficult to get anything higher while avoiding possible confusion between signed and unsigned, so it seems at least a reasonable approximation for infinity.

That said, I don't know for sure, this is just a guess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.