"Fossies" - the Fresh Open Source Software Archive

Member "heaplayers-351/benchmarks/mudlle/examine.mud" (15 Oct 2003, 488 Bytes) of package /linux/misc/old/heaplayers_3_5_1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 // Display sizes of global variables (after specified offset)
    2 
    3 gsize = fn (from)
    4   foreach(fn (gsym)
    5 	  [
    6 	    | n |
    7 	    n = symbol_get(gsym);
    8 	    if (n >= from)
    9 	      [
   10 		| size |
   11 		size = obj_size(global_value(n)) - 4;
   12 
   13 		display(format("%s: %s\n", symbol_name(gsym), size))
   14 	      ]			     
   15 	  ], lqsort(fn (s1, s2) string_cmp(symbol_name(s1), symbol_name(s2)) <= 0, table_list(global_table())));
   16 
   17 gfind = fn (n)
   18   lexists?(fn (gs) symbol_get(gs) == n, table_list(global_table()));