C
Craig6213
Guest
I’m working on a universal windows app that has to read a list of files located in a variety of folders and process them sequentially. I’m using the Windows::Storage class Async file I/O functions to do the reading. I’m calling them in the chain of continuation tasks that I generate recursively. The number of files I’m reading has grown to 1100 and the app is running out of memory. I commented out all code that could possibly cause a memory leak and ran tests that indicate that the app is accumulating a lot of stack memory in the large number of threads that it fires up (probably around 3000). The amount of memory that the app uses is proportional to the number of function calls that it is making in the threads and I finally received a message indicating that the app ran out of stack memory. Increasing the stack memory allocations didn’t seem to offer any relief.
Can you refer me to the latest thinking, advice and code examples for doing file I/O sequentially in a loop or avoiding the memory accumulation issue.
Thank you in advance for your help.
Continue reading...
Can you refer me to the latest thinking, advice and code examples for doing file I/O sequentially in a loop or avoiding the memory accumulation issue.
Thank you in advance for your help.
Continue reading...