According to the 1999 ISO C standard (C99), size_t is an unsigned integer type of at least 16 bit (see sections 7.17 and 7.18.3), it may be uint32 in 32-bit platforms: https://en.cppreference.com/w/cpp/types/size_t Calling function `size_t min(size_t, size_t)` with two uint64 arguments may get invalid result. Co-authored-by: Georgii Rylov <godjan@amazon.co.uk>