aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/ets_SUITE.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2011-05-22 01:26:06 +0200
committerRickard Green <[email protected]>2011-07-08 16:08:37 +0200
commit1dfaae304dfcc4f249c62b5ab7ff3bd4acef0d50 (patch)
tree04267b5e56237c9f2bee3e4a5e02873a4b95fcc5 /lib/stdlib/test/ets_SUITE.erl
parent4a5a75811e2cd590b5c94f71864a5245fd511ccf (diff)
downloadotp-1dfaae304dfcc4f249c62b5ab7ff3bd4acef0d50.tar.gz
otp-1dfaae304dfcc4f249c62b5ab7ff3bd4acef0d50.tar.bz2
otp-1dfaae304dfcc4f249c62b5ab7ff3bd4acef0d50.zip
Use separate memory carriers for small blocks
Diffstat (limited to 'lib/stdlib/test/ets_SUITE.erl')
-rw-r--r--lib/stdlib/test/ets_SUITE.erl19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 9d348b5f1a..c9d82ec5f5 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -5517,20 +5517,21 @@ etsmem() ->
case erlang:system_info({allocator,ets_alloc}) of
false -> undefined;
MemInfo ->
- MSBCS = lists:foldl(
- fun ({instance, _, L}, Acc) ->
- {value,{_,MBCS}} = lists:keysearch(mbcs, 1, L),
- {value,{_,SBCS}} = lists:keysearch(sbcs, 1, L),
- [MBCS,SBCS | Acc]
- end,
- [],
- MemInfo),
+ CS = lists:foldl(
+ fun ({instance, _, L}, Acc) ->
+ {value,{_,SBMBCS}} = lists:keysearch(sbmbcs, 1, L),
+ {value,{_,MBCS}} = lists:keysearch(mbcs, 1, L),
+ {value,{_,SBCS}} = lists:keysearch(sbcs, 1, L),
+ [SBMBCS,MBCS,SBCS | Acc]
+ end,
+ [],
+ MemInfo),
lists:foldl(
fun(L, {Bl0,BlSz0}) ->
{value,{_,Bl,_,_}} = lists:keysearch(blocks, 1, L),
{value,{_,BlSz,_,_}} = lists:keysearch(blocks_size, 1, L),
{Bl0+Bl,BlSz0+BlSz}
- end, {0,0}, MSBCS)
+ end, {0,0}, CS)
end},
{Mem,AllTabs}.