diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-12-06 21:33:32 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-12-14 15:13:00 +0100 |
commit | 438382308bd34186e48d1cbee992e6e93a8fddd2 (patch) | |
tree | d6286cf1e3ebcb899770ceaf887fd0793678fa25 /erts/emulator/test/beam_SUITE.erl | |
parent | 30a65a6253a74ff6aab23142675bf2d801ba840e (diff) | |
download | otp-438382308bd34186e48d1cbee992e6e93a8fddd2.tar.gz otp-438382308bd34186e48d1cbee992e6e93a8fddd2.tar.bz2 otp-438382308bd34186e48d1cbee992e6e93a8fddd2.zip |
tests: Fix heap_sizes check
Diffstat (limited to 'erts/emulator/test/beam_SUITE.erl')
-rw-r--r-- | erts/emulator/test/beam_SUITE.erl | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/erts/emulator/test/beam_SUITE.erl b/erts/emulator/test/beam_SUITE.erl index 02c6e19686..60683d2634 100644 --- a/erts/emulator/test/beam_SUITE.erl +++ b/erts/emulator/test/beam_SUITE.erl @@ -215,11 +215,18 @@ heap_sizes(Config) when is_list(Config) -> (E, []) -> E end, [], Sizes), - %% Verify that the largest heap size consists of 31 or 63 bits. - ?line - case Largest bsr (erlang:system_info(wordsize)*8-2) of - R when R > 0 -> ok - end, + %% Verify that the largest heap size consists of + %% - 31 bits of bytes on 32 bits arch + %% - atleast 52 bits of bytes (48 is the maximum virtual address) + %% and at the most 63 bits on 64 bit archs + %% heap sizes are in words + case erlang:system_info(wordsize) of + 8 -> + 0 = (Largest*8) bsr 63, + true = (Largest*8) > (1 bsl 52); + 4 -> + 1 = (Largest*4) bsr 31 + end, ok. %% Thanks to Igor Goryachev. |