What would be nice is something that prints current heap size (without consuming any heap itself) that I could sprinkle through the code, so that I could see which statement allocates memory.
On Friday, 14 March 2014 23:49:53 UTC-3, andrew cooke wrote: > > > Any tips / pointers / docs on how to do this? > > I have some code that, according to @time, is using more memory than I > expect. How do I work out where the problem is, and reduce the memory use? > > Is there anything more efficient than writing small tests that focus on > particular operations? > > I suspect my problem is that instances are being created on the heap when > I expected them to be on the stack (the main data type hasa single field, > which is an integer). > > Thanks, > Andrew > >
