views:

15

answers:

0

Hi,

I am refactoring an external merge sort in C#. The current implementation uses a fixed chunk size of 50mb. I'd like to query the performance counters and dynamically calculate a good chunk size. I'm just not sure which counters to use? Do I get the total available memory and use a percentage of that or can I find how much is available just to my process and use that?

Thanks, Neil