|Anonymous | Login | Signup for a new account||2017-11-22 13:56 CET|
|Main | My View | View Issues | Change Log | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000227||ILNumerics||[All Projects] Please Check!||public||2016-03-24 11:29||2016-03-24 11:32|
|Summary||0000227: Inefficient memory management on large arrays in binary operations and in loops|
|Description||The following code was expected to consume only two array storages. But it seems that a new storage is allocated in each loop iteration. vArray.a = ... does not free the storage but keeps them alive until GC kicks in: |
Dim vArray As ILArray(Of Double) = ILMath.rand(10000000)
For i As Integer = 1 To 100
vArray.a = ILMath.add(vArray, vArray)
|Steps To Reproduce||Rund the above code. Monitor memory allocation / usage.|
|Tags||No tags attached.|
fixed in 4.10. The problem was the way binary infix operators were defined on the generic ILArray<T> objects. The generic operator definition required an additional (lazy) copy of the original input parameters. This increased the internal reference counter on the input array, which in turn prevented the array from being freed into the pool during assignment.
We fixed it by redefining the binary operators in the internal layer, circumventing the explicit function types and falling back to the base arrays.
Now, the memory menagement works as expected - even in this special case.
|2016-03-24 11:29||ho||New Issue|
|2016-03-24 11:29||ho||Status||new => assigned|
|2016-03-24 11:29||ho||Assigned To||=> ho|
|2016-03-24 11:32||ho||Note Added: 0000234|
|2016-03-24 11:32||ho||Status||assigned => resolved|
|2016-03-24 11:32||ho||Resolution||open => fixed|
|Copyright © 2000 - 2011 MantisBT Group|