The number of atoms is limited to 16777216 (16M) on 32-bit machines. On 64-bit machines this is virtually unlimited. See also section 10.4.2.1.
resource_error. On systems that lack GMP, integers are 64-bit on 32- as well as 64-bit machines.
Integers up to the value of the max_tagged_integer Prolog flag are represented more efficiently on the stack. For integers that appear in clauses, the value (below max_tagged_integer or not) has little impact on the size of the clause.