R
Rolf Welskes
Hello,
I have an applications witch works with bitmaps.
Such bitmaps are in windows (forms) sizeable. Each time it is neccary to
allocate new bitmap with any size-step, because the bitmap
is generated.
So there is the following situation under .net 1.1
If the window (bitmap) is sized for exampel 10 bitmaps are generated and
disposed in 2 seconds.
Because the GC does not make garbage collection directly, this costs 10 MB
ram instead of 1.
If it is exreme, an application which needs realy 10 MB - you see in the
taskmanager 50 MB.
But this is the first layer of the problem.
Now some time later, maybe the GC makes a garbace collection.
Now GC-Memory has 10 MB used and 40 MB free.
BUT the GC does not give the memory back to the system.
(sometimes GC gives a little back to the system, but not all).
Means: for a long time you see 50 MB RAM resources used in the tasks manger,
what is not the reality, it's only 10 MB.
This problem is very hard, because customers see this in the task manager
und do not buy the product.
So question:
Is there any way under dot net 1.1 (.net net 2.0 is absolute impossible in
the moment because of many reasons),
to reduce the shown used Memory, which is wrong in the taskmanager for this
app.
Means is it possible to solve the problem when the bitmap is sized that
memory is not accumulated, because
with each new bitmap the old is disposed.
I think there will be no solution under .Net / C#, but would be fine.
But also a solution using C++ / unmanged code would be nice. (for the
allocation of memory of the bitmaps only).
Thank you for any help.
Rolf Welskes
I have an applications witch works with bitmaps.
Such bitmaps are in windows (forms) sizeable. Each time it is neccary to
allocate new bitmap with any size-step, because the bitmap
is generated.
So there is the following situation under .net 1.1
If the window (bitmap) is sized for exampel 10 bitmaps are generated and
disposed in 2 seconds.
Because the GC does not make garbage collection directly, this costs 10 MB
ram instead of 1.
If it is exreme, an application which needs realy 10 MB - you see in the
taskmanager 50 MB.
But this is the first layer of the problem.
Now some time later, maybe the GC makes a garbace collection.
Now GC-Memory has 10 MB used and 40 MB free.
BUT the GC does not give the memory back to the system.
(sometimes GC gives a little back to the system, but not all).
Means: for a long time you see 50 MB RAM resources used in the tasks manger,
what is not the reality, it's only 10 MB.
This problem is very hard, because customers see this in the task manager
und do not buy the product.
So question:
Is there any way under dot net 1.1 (.net net 2.0 is absolute impossible in
the moment because of many reasons),
to reduce the shown used Memory, which is wrong in the taskmanager for this
app.
Means is it possible to solve the problem when the bitmap is sized that
memory is not accumulated, because
with each new bitmap the old is disposed.
I think there will be no solution under .Net / C#, but would be fine.
But also a solution using C++ / unmanged code would be nice. (for the
allocation of memory of the bitmaps only).
Thank you for any help.
Rolf Welskes