anchor.diff:             [Status, erlang:memory(total), erlang:memory(binary), Table, Memory, ContentSize]),
       garbage_collect_all().
   
  +%% @doc Gets memory statistics.
   -spec get_meminfo() -> #mem_info{}.
   get_meminfo() ->
       [{binary, BinSize}, {atom_used, AtomUSize}, {processes_used, ProcUSize}, {ets, EtsSize}] =
  
positive.code:     #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().
  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,
  
negative.code:     NewMemInfo#mem_info.processes_used =< (PrevMemInfo#mem_info.processes_used + 50000) andalso
      NewMemInfo#mem_info.ets =< (PrevMemInfo#mem_info.ets + 50000 + (EntryEtsSize * NewItems)).
  
  %% @doc Checks whether the NewMemInfo field indicates increased memory use
  %%      compared to PrevMemInfo. AddedSize is the expected binary size
  %%      difference.
  %%      Note: Tolerates 250k binary and 250k processes_used overhead.
  -spec check_memory_inc(
          PrevMemInfo::#mem_info{}, NewMemInfo::#mem_info{},
          NewItems::non_neg_integer(), AddedSize::non_neg_integer()) -> ok.
  check_memory_inc(PrevMemInfo, NewMemInfo, NewItems, AddedSize) ->
      % assume an entry for an item uses 4 * 1k memory for ets (excluding the binary size)
      EntryEtsSize = 4 * 1000,
  