Hi Tom,
There are a number of tools in Poly/ML for measuring memory usage but it really depends on what you want to measure.

The simplest is to use PolyML.profiling 2; This prints a profile of the memory allocated in each function, but be aware that small functions are often inlined in larger ones so don't have their own counts. This is primarily provided to detect hot-spots which are allocating short-term memory. This count will include function closures or tuples created just to pass multiple values around.

If you are building large data structures you can use PolyML.objSize to count the number of words used in the structure.

You may find some of the results from PolyML.Statistics.getLocalStats() useful but you will need to interpret the results.

Hope that is of some help.
David

On 18/08/2014 07:56, Tom Meumann wrote:
Hi all,

Is it possible to measure the memory usage involved in a particular
function call from within PolyML 5.5.0?

I'm trying to figure out how much memory my vote-counting function
uses to count a variety of lists of votes.  I'm randomly generating
the vote lists, and the functions I'm using for generating the lists
seem to use more memory than the count itself.

I can't measure what I need with OS tools because they return the memory
used to generate the vote lists (because it's larger).

I'm not sure where to look for functions of this nature, or if they're
even provided in PolyML.

Any help appreciated.

Thanks in advance,

Tom
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to