aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-07-03 09:33:02 +0200
committerGitHub <[email protected]>2018-07-03 09:33:02 +0200
commit6cfa8af60a9c6fe9043e4992434d40d4a34019e3 (patch)
tree822993e0a4fb987014238369db045bf53eaafba3 /lib/stdlib/test
parentbc22321f10c1ad71fb7e28275a8e6ed26a34d4ab (diff)
parent29ce7ab0e4403fa688d1e5e5e2170e88d7e8f299 (diff)
downloadotp-6cfa8af60a9c6fe9043e4992434d40d4a34019e3.tar.gz
otp-6cfa8af60a9c6fe9043e4992434d40d4a34019e3.tar.bz2
otp-6cfa8af60a9c6fe9043e4992434d40d4a34019e3.zip
Merge pull request #1854 from jhogberg/john/erts/cross-type-carrier-migration/OTP-15063
Allow carrier migration between different allocator types
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/ets_SUITE.erl35
1 files changed, 3 insertions, 32 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 7a48d1d55e..fee8b204f4 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -6112,40 +6112,11 @@ etsmem() ->
ets:info(T,memory),ets:info(T,type)}
end, ets:all()),
- EtsAllocInfo = erlang:system_info({allocator,ets_alloc}),
+ EtsAllocSize = erts_debug:alloc_blocks_size(ets_alloc),
ErlangMemoryEts = try erlang:memory(ets) catch error:notsup -> notsup end,
- Mem =
- {ErlangMemoryEts,
- case EtsAllocInfo of
- false -> undefined;
- MemInfo ->
- CS = lists:foldl(
- fun ({instance, _, L}, Acc) ->
- {value,{mbcs,MBCS}} = lists:keysearch(mbcs, 1, L),
- {value,{sbcs,SBCS}} = lists:keysearch(sbcs, 1, L),
- NewAcc = [MBCS, SBCS | Acc],
- case lists:keysearch(mbcs_pool, 1, L) of
- {value,{mbcs_pool, MBCS_POOL}} ->
- [MBCS_POOL|NewAcc];
- _ -> NewAcc
- end
- end,
- [],
- MemInfo),
- lists:foldl(
- fun(L, {Bl0,BlSz0}) ->
- {value,BlTup} = lists:keysearch(blocks, 1, L),
- blocks = element(1, BlTup),
- Bl = element(2, BlTup),
- {value,BlSzTup} = lists:keysearch(blocks_size, 1, L),
- blocks_size = element(1, BlSzTup),
- BlSz = element(2, BlSzTup),
- {Bl0+Bl,BlSz0+BlSz}
- end, {0,0}, CS)
- end},
- {Mem,AllTabs}.
-
+ Mem = {ErlangMemoryEts, EtsAllocSize},
+ {Mem, AllTabs}.
verify_etsmem(MI) ->
wait_for_test_procs(),