diff options
author | Rickard Green <[email protected]> | 2013-06-04 16:27:47 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2013-06-04 16:27:47 +0200 |
commit | b2c5216804b4470066414977026cf8de76d005c5 (patch) | |
tree | c34d4bf0667a7377d300f2d9585ccdabe513f102 /lib/stdlib | |
parent | d0a933df7a84a9a90b948af0c1bd16df3fccbbf5 (diff) | |
parent | 528c24a93685850b3f54d6c08a975b05b7ede55a (diff) | |
download | otp-b2c5216804b4470066414977026cf8de76d005c5.tar.gz otp-b2c5216804b4470066414977026cf8de76d005c5.tar.bz2 otp-b2c5216804b4470066414977026cf8de76d005c5.zip |
Merge branch 'maint'
* maint:
stdlib: Fix ets_SUITE memory tests
Diffstat (limited to 'lib/stdlib')
-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 41449a1071..82c3e7ecaf 100644 --- a/lib/stdlib/test/ets_SUITE.erl +++ b/lib/stdlib/test/ets_SUITE.erl @@ -5675,16 +5675,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}, |