diff --git a/lib/asn1/test/asn1_test_lib.erl b/lib/asn1/test/asn1_test_lib.erl index cf96c6983a96..9b08db10211f 100644 --- a/lib/asn1/test/asn1_test_lib.erl +++ b/lib/asn1/test/asn1_test_lib.erl @@ -307,16 +307,18 @@ ber_get_len(<<1:1,Octets:7,T0/binary>>) -> p_run(Test, List) -> %% Limit the number of parallel processes to avoid running out of - %% memory. + %% virtual address space or memory. This is especially important + %% on 32-bit Windows, where only 2 GB of virtual address space is + %% available. S = case {erlang:system_info(schedulers),erlang:system_info(wordsize)} of - {S0,4} -> - min(S0, 2); + {_,4} -> + 1; {S0,_} -> min(S0, 8) end, N = case test_server:is_cover() of false -> - S + 1; + S; true -> %% Cover is running. Using too many processes %% could slow us down. diff --git a/lib/compiler/test/test_lib.erl b/lib/compiler/test/test_lib.erl index 7ad2272450d2..3b1cff569212 100644 --- a/lib/compiler/test/test_lib.erl +++ b/lib/compiler/test/test_lib.erl @@ -163,14 +163,15 @@ highest_opcode(Beam) -> p_run(Test, List) -> %% Limit the number of parallel processes to avoid running out of - %% memory. - S = case {erlang:system_info(schedulers),erlang:system_info(wordsize)} of - {S0,4} -> - min(S0, 2); - {S0,8} -> - min(S0, 8) + %% virtual address space or memory. This is especially important + %% on 32-bit Windows, where only 2 GB of virtual address space is + %% available. + N = case {erlang:system_info(schedulers),erlang:system_info(wordsize)} of + {_,4} -> + 1; + {N0,8} -> + min(N0, 8) end, - N = S + 1, p_run(Test, List, N). p_run(Test, List, N) ->