diff options
author | Rickard Green <[email protected]> | 2013-06-04 16:19:39 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2013-06-04 16:19:39 +0200 |
commit | b8c941265433e1bdff12c49c611349f6abba1a9e (patch) | |
tree | 96b6f66451f276ea6bbc9a9b45b0de9ec7c5dc96 /lib/stdlib/test/ets_SUITE.erl | |
parent | f91c381afa2ebed6e37b49b4cc3f81bb9ca9e3eb (diff) | |
download | otp-b8c941265433e1bdff12c49c611349f6abba1a9e.tar.gz otp-b8c941265433e1bdff12c49c611349f6abba1a9e.tar.bz2 otp-b8c941265433e1bdff12c49c611349f6abba1a9e.zip |
stdlib: Fix ets_SUITE memory tests
Need to take 'mbcs_pool' into account.
Diffstat (limited to 'lib/stdlib/test/ets_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/ets_SUITE.erl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl index 7550503376..2b29566942 100644 --- a/lib/stdlib/test/ets_SUITE.erl +++ b/lib/stdlib/test/ets_SUITE.erl @@ -5626,16 +5626,25 @@ etsmem() -> MemInfo -> CS = lists:foldl( fun ({instance, _, L}, Acc) -> - {value,{_,MBCS}} = lists:keysearch(mbcs, 1, L), - {value,{_,SBCS}} = lists:keysearch(sbcs, 1, L), - [MBCS,SBCS | 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,{_,Bl,_,_}} = lists:keysearch(blocks, 1, L), - {value,{_,BlSz,_,_}} = lists:keysearch(blocks_size, 1, L), + {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}, |