diff options
author | Sverker Eriksson <[email protected]> | 2010-01-13 11:35:13 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-01-13 14:58:31 +0100 |
commit | bcf62deb7b8534b00ce69c977466a009252ee8a5 (patch) | |
tree | 237405be3ddf2b984399926f68856ad7036631aa /lib/stdlib/test/ets_SUITE.erl | |
parent | 405de8c986fd22c05f398036edac809e98149292 (diff) | |
download | otp-bcf62deb7b8534b00ce69c977466a009252ee8a5.tar.gz otp-bcf62deb7b8534b00ce69c977466a009252ee8a5.tar.bz2 otp-bcf62deb7b8534b00ce69c977466a009252ee8a5.zip |
OTP-8240 Improved GC performance after BIF/NIF call when a lot of heap
fragments was created. This will mainly benefit NIFs that return
large compound terms.
Diffstat (limited to 'lib/stdlib/test/ets_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/ets_SUITE.erl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl index 6016bc9bdc..13c87ca005 100644 --- a/lib/stdlib/test/ets_SUITE.erl +++ b/lib/stdlib/test/ets_SUITE.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% -module(ets_SUITE). @@ -4530,10 +4530,16 @@ meta_wb(Config) when is_list(Config) -> meta_wb_do(Opts) -> %% Do random new/delete/rename of colliding named tables - Names = [pioneer | colliding_names(pioneer)], + Names0 = [pioneer | colliding_names(pioneer)], + + %% Remove any names that happen to exist as tables already + Names = lists:filter(fun(Name) -> ets:info(Name) == undefined end, + Names0), Len = length(Names), OpFuns = {fun meta_wb_new/4, fun meta_wb_delete/4, fun meta_wb_rename/4}, + ?line true = (Len >= 3), + io:format("Colliding names = ~p\n",[Names]), F = fun(0,_,_) -> ok; (N,Tabs,Me) -> Name1 = lists:nth(random:uniform(Len),Names), |