anchor.diff:      #mem_info{binary = BinSize, atom_used = AtomUSize,
                 processes_used = ProcUSize, ets = EtsSize}.
   
  --spec check_memory_inc_bool(PrevMemInfo::#mem_info{}, NewMemInfo::#mem_info{}, NewItems::non_neg_integer(), AddedSize::non_neg_integer()) -> boolean().
  +%% @doc Checks whether the NewMemInfo field indicates increased memory use
  +%%      compared to PrevMemInfo and returns whether this is the case or not.
  +%%      AddedSize is the expected binary size difference.
  +%%      Note: Tolerates 50k binary and 50k processes_used overhead.
  +-spec check_memory_inc_bool(
  +        PrevMemInfo::#mem_info{}, NewMemInfo::#mem_info{},
  +        NewItems::non_neg_integer(), AddedSize::non_neg_integer()) -> boolean().
   check_memory_inc_bool(PrevMemInfo, NewMemInfo, NewItems, AddedSize) ->
       % assume an entry for an item uses 4 * 1k memory for ets (excluding the binary size)
       EntryEtsSize = 4 * 1000,
  
positive.code: -include("record_helpers.hrl").
  
  all()   -> [
              write_1000,
              fill_1000,
              fill_2000,
              modify_100x100
             ].
  suite() -> [ {timetrap, {seconds, 300}} ].
  
  init_per_suite(Config) ->
      unittest_helper:init_per_suite(Config).
  
  end_per_suite(Config) ->
      _ = unittest_helper:end_per_suite(Config),
      ok.
  
  init_per_testcase(_TestCase, Config) ->
      %% stop ring from previous test case (it may have run into a timeout
      unittest_helper:stop_ring(),
      {priv_dir, PrivDir} = lists:keyfind(priv_dir, 1, Config),
      unittest_helper:make_ring(1, [{config, [{log_path, PrivDir}, {monitor_perf_interval, 0}]}]),
      config:write(no_print_ring_data, true),
  
negative.code:                    ets            = ?required(mem_info, ets)            :: pos_integer()
                    }).
  
  %% @doc Creates an uncompressed binary of a list of Size integers starting at I.
  -spec make_binary(I::integer(), Size::non_neg_integer()) -> binary().
  make_binary(I, Size) when Size >= 0->
      Res = erlang:term_to_binary(lists:seq(I, I + Size)),
  %%     ct:pal("binary size: ~B", [erlang:byte_size(Res)]),
      Res.
  
  %% @doc Prints information about the given ets table ID and compares it with
  %%      the total Erlang VM memory stats.
  print_table_info(Table) ->
      print_table_info(Table, "").
  
  %% @doc Prints information about the given ets table ID and compares it with
  %%      the total Erlang VM memory stats (prefixes the message with Status). 
  print_table_info(Table, Status) ->
      Memory = ets:info(Table, memory),
      ContentSize = lists:sum([byte_size(element(2,X)) || X <- ets:tab2list(Table), is_binary(element(2, X))]),
  