Posted Monday, August 18, 2008 1:10 PM
|
|
|
|
| I am using the library to perform a series of calibration steps that are very process intensive. Currently memory is being overloaded and corrputed. We have created a level of abstraction in the form of a .NET math library to communicate with the .Net matrix library that can be used from a variety of enviroments and add some functionality that fits our needs. Currently we are referencing this .net library from a VB6 project that is creating and storing matrix's on a massive scale. There is a very process intensive section were we have to calculate 300,000 squeezed matrix's. The problem that is occur is due to the fact the garbage collection does not seem to recognize the Matrix objects and clear the memory our program is jumping up to takin over a gb of memory. I've tried to use the dispose method that is talked about in a few of these forms but this seems to add a massive overhead which takes almost 10x as long to run, but seems to correct the memory issue. Is there any way/ idea to have the best of both worlds, the longer run-time is no where acceptable for our project, but we need to find a way to have it run reliably and fast.
|
|
Posted Monday, August 18, 2008 3:01 PM
|
|
|
|
| It looks like it might be so much overhead that the dipose method itself is not clearing the issue. I got it to run by doing a GC.Collect after the dipose method everytime, but this creates the large slowdown
|
|
Posted Tuesday, August 19, 2008 2:11 AM
|
|
|
|
| I would try the following: If all the stored matrices have the same size, instead of creating new matrices in order to perform calculations, I would try to pass the numerical data into the same matrix objects and reuse them eliminating the need for creating new matrix objects and disposing them afterwards. What is the size of your matrices?
Trifon Triantafillidis | Lead Developer |
|
|
|
Posted Tuesday, August 19, 2008 10:05 AM
|
|
|
|
| I actually went about doing this but in the inbetween layer I wrote so that I could add new functionaliy I didn't handle it correct, Looks like I might have found the memory leak for now. The matrixes are usually 640 x 480 but as time goes on they might get up to 720p or 1080p
|
|
|
|