[m-dev.] memory profiling

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Sep 24 17:23:01 AEST 1999


Hi,

Regarding Ralph's unexplained memory allocation mentioned on mercury-users,
I've enclosed below a list of most of the procedures that allocate
memory which is not accounted for by the memory profiler.  I've just
committed a couple of fixes which make the profiler include these.
Ralph, if any of these routines show up in the call profile, then you
might want to try the next rotd release.

However, there are a few things that the memory profiler still misses:
- boxing of floating point values [float_to_word()]
- string copying [MR_make_aligned_string(), MR_make_aligned_string_copy()]
  called from various places
- term copying [incr_saved_hp() in runtime/mercury_deep_copy_body.h]
  called from std_util:solutions, std_util:aggregate, etc.
- perhaps some others that I have missed.

These are not yet fixed.

Cheers,
	Fergus.

<function 'std_util:argument'/2 mode 0>
<function 'std_util:construct'/3 mode 0>
<function 'std_util:make_type'/2 mode 0>
<predicate 'io:alloc_buffer'/2 mode 0>
<predicate 'io:command_line_arguments'/3 mode 0>);
<predicate 'io:ferror'/5 mode 0>
<predicate 'io:make_err_msg'/4 mode 0>
<predicate 'io:make_temp'/5 mode 0>
<predicate 'io:read_line_as_string_2'/5 mode 0>
<predicate 'io:remove_file_2'/5 mode 0>
<predicate 'io:rename_file_2'/6 mode 0>
<predicate 'io:resize_buffer'/4 mode 0>
<predicate 'std_util:deconstruct'/4 mode 0>
<predicate 'std_util:deconstruct'/4 mode 0>);
<predicate 'std_util:type_to_univ'/2 mode 0>
<predicate 'std_util:type_to_univ'/2 mode 1>
<predicate 'store:new_arg_ref'/5 mode 0>
<predicate 'store:new_mutvar'/4 mode 0>
<predicate 'store:new_ref'/4 mode 0>
<predicate 'store:unsafe_new_uninitialized_mutvar'/3 mode 0>
<predicate 'string:append'/3 mode 1>
<predicate 'string:append'/3 mode 2>
<predicate 'string:append'/3 mode 3>
<predicate 'string:first_char'/3 mode 2>
<predicate 'string:first_char'/3 mode 3>
<predicate 'string:first_char'/3 mode 4>
<predicate 'string:float_to_f_string'/2 mode 0>
<predicate 'string:float_to_string'/2 mode 0>
<predicate 'string:from_rev_char_list'/2 mode 0>
<predicate 'string:split'/4 mode 0>
<predicate 'string:substring'/4 mode 0>
<predicate 'string:to_int_list'/2 mode 0>);
<predicate 'string:to_int_list'/2 mode 1>
<predicate 'string:unsafe_substring'/4 mode 0>

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list