Quote:
Originally Posted by whatsup
Now, I still will need some time to follow things up in your code, but as far as I see it by now, you basically working on the allocated memory to excel, I'm right? In that case be aware, that windows doesn't reclaim memory once granted at the insance it isn't needed anymore - maybe even not until excel is closed.
Having a look at your summary for "DictionarySearch":
Code:
17:19:21:0520 Call RangeCompare2: Don't Set to Nothing: WorkingSetSize 180,219,904 ( Reference )
17:19:21:0700 Start Timer: t = 0.000 sec: WorkingSetSize 180,867,072 ( 647,168 )
17:19:21:0720 arrCompare Loaded: t = 0.016 sec: WorkingSetSize 181,526,528 ( 1,306,624 )
17:19:21:0820 objDic Loaded: t = 0.115 sec: WorkingSetSize 182,345,728 ( 2,125,824 )
17:19:21:0830 arrData Loaded: t = 0.130 sec: WorkingSetSize 182,669,312 ( 2,449,408 )
17:19:22:0010 Output to Range2 Complete: t = 0.304 sec: WorkingSetSize 182,976,512 ( 2,756,608 )
17:19:22:0160 after End Sub: WorkingSetSize 196,042,752 ( 15,822,848 )
I would interprete it the way, that although at Start has been allocated 180,219,904 Bytes, excel was claiming more memory for the task and ended up with 196,042,752 Bytes allocated. That means it doesn't say exactly whether or not memory was freed during or after runtime. It just says, that at the end excel now is asigned the 196 millions Bytes of memory whether it uses them or not. - Are you following what I try to say?
By the way: What for heavens sake is excel 2013 doing with this huge ammount of memory? I just once gave it a shot showing my version just was in need of about 80 millions ... When you start excel and let it run what the results then like?
Just a few thoughts to share with you 
|
Wow. That's a very unusual run. When I do it I almost always get less working set than at the start and if it's more it's only a small amount, which I assume is just normal bits and pieces going on in the background. The runs I did clearly showed that the memory had been freed.
But, sure... This is only the very beginning for me in understanding memory management and I still have a lot if reading to do before I can confidently interpret these results. If you have any useful links to offer please throw them down here. I would be very grateful of that.
My main aim for that post was to throw down a nice tool as a starting point for looking at the memory dynamics, so that we can explore a bit. And I rather got a bit obsessed with that goal... Which was good fun!
I didn't really spend much time yet, trying to understand the results, so I'm very interested in your feedback.
There are other metrics, apart from working set that can be reported by the API calls so take a look at that see if you see any better measure...
Cheers mate.