I am in the process of trying to track down memory leaks in our application during while running for long periods of time. In order to do this we have written a number of workouts that attempt to do things within the application that would cause the memory leaks to happen quicker than normal. For this example we create and destroy geometry continually. I have found that, while slow, the FieldContainerFactory seems to leak memory. The issue is that the _vContainerStore grows without bounds. Each time a field container is created a new pointer is pushed onto the deque, and when the field container is destroyed the pointer is only set to NULL. This results in a substantial memory growth in our test case. For example the following metrics were taken (allocated fcs / total fcs).
1: 7728 / 5230331 2: 7728 / 12853482 3: 7728 / 21880995 Doing some quick math, on a 32-bit machine the vector containing the field container pointers would grow by at least 4 bytes for each entry. 3 - 2: (21880995 - 12853482) * 4 / (1024.0 * 1024.0) = 34.4372 MB 2 -12: (12853482 - 5230331) * 4 / (1024.0 * 1024.0) = 29.0800 MB Does this make sense that we are losing memory at this location? And if we are what ideas do people have to fix this? My first naive approach would be to search for the first entry with a NULL value, but this will probably be much slower than we would want. I don't think that we can erase the entries because the index is used as the field container ID. Another idea would be to keep a vector of available empty slots that could be used when creating a new field container. Thank you, Aron ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users