On my Linux machine, I can see the virtual memory size for the process balloon out as it runs, but the actual resident set size is fixed at 5688 (k, I suppose), no matter how many frames it runs for. That is, it's allocating but not actually *using* that memory. Also, valgrind reports no lost blocks at exit, which just means that it's all being deallocated before the program exits. At least, that's how it runs on Linux (Ubuntu 8.04); what architecture are you running on? Maybe this memory-allocation strategy dies horribly on Windows because of a difference in the system library where it actually uses the allocated memory, even if the program doesn't. Perhaps it thinks it needs more memory, but it really doesn't.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
RIB file that eats through memory
On my Linux machine, I can see the virtual memory size for the process balloon out as it runs, but the actual resident set size is fixed at 5688 (k, I suppose), no matter how many frames it runs for. That is, it's allocating but not actually *using* that memory. Also, valgrind reports no lost blocks at exit, which just means that it's all being deallocated before the program exits. At least, that's how it runs on Linux (Ubuntu 8.04); what architecture are you running on? Maybe this memory-allocation strategy dies horribly on Windows because of a difference in the system library where it actually uses the allocated memory, even if the program doesn't. Perhaps it thinks it needs more memory, but it really doesn't.