anchor.diff:    end.
   
   format(NK,V,V0) ->
  -  {lists:reverse(NK),V0/1024/1024,V/1024/1024,divide(V,V0)}.
  +  {lists:reverse(NK),V0,V,divide(V,V0)}.
   
   divide(_V,0) -> 1.0;
   divide(V,V0) -> V/V0.
  
positive.code: printh(AggInds,Cols) ->
    io:fwrite("~-33w~8w~8w~8w~n",[AggInds]++tl(Cols)).
  print({K,T,U,F}) ->
    io:fwrite("~-33w~8.2f~8.2f~8.2f~n",[K,T,U,F]).
  
  present({K,V},A) ->
    case {A,lists:reverse(K)} of
  
negative.code:       getallocdata())).
  
  calls() ->
    Form = "~-7s~8s~8s~8s~8s~8s~8s~8s~8s~8s~n",
    io:fwrite(Form,["alloc",
                    "all/m","deall/m","reall/m",
                    "all/s","free/s","reall/s",
                    "alloc","free","reall"]),
    lists:foreach(
      fun(T) -> io:fwrite(Form,massage(T)) end,
      lists:foldl(
        fun({[X,mseg,alloc],V},A)   -> stuffit(X,1,V,A);
           ({[X,mseg,dealloc],V},A) -> stuffit(X,2,V,A);
           ({[X,mseg,realloc],V},A) -> stuffit(X,3,V,A);
           ({[X,sys,alloc],V},A)    -> stuffit(X,4,V,A);
           ({[X,sys,free],V},A)     -> stuffit(X,5,V,A);
           ({[X,sys,realloc],V},A)  -> stuffit(X,6,V,A);
           ({[X,_,alloc],V},A)      -> stuffit(X,7,V,A);
           ({[X,_,free],V},A)       -> stuffit(X,8,V,A);
           ({[X,_,realloc],V},A)    -> stuffit(X,9,V,A)
        end,
        [],
        lists:sort(aggregate([allocator,type,info],[calls])))).
  
  massage(Tup) ->
    [H|T] = tuple_to_list(Tup),
    [hd(string:tokens(atom_to_list(H),"_"))|T].
  
  stuffit(X,N,V,A) ->
    try
      X = element(1,hd(A)),
      [setelement(N+1,hd(A),prf:human(V))|tl(A)]
    catch
      _:_ -> stuffit(X,N,V,[{X,0,0,0,0,0,0,0,0,0}|A])
    end.
  
  allocs() ->
    allocs(allocd).
  