I have a fairly simple C# application that has builds a large hashtable. The keys of this hashtable are strings, and the values are ints.
The program runs fine until around 10.3 million items are added to the hashtable, when an out of memory error is thrown on the line that adds an item to the hasbtable.
According to the task manager, my program is only using 797mb of memory, and there's still over 2gb available. It's a 32-bit machine, so I know only a total of 2gb can be used by one process, but that still leaves about 1.2gb that the hashtable should be able to expand into.
Why would an out of memory error be thrown?