Low Virtual memory problem with Memory Stream?
-
Hi, I'm facing a problem while transmitting a live video on LAN using memory stream object. But when I run application,after some time,my system prompt me "Low virtual memory". Actually the reason is the Memory stream.As there are two ways to convert the BMP into Byte ARRAY i.e Stream or File so tell me any solution or any other better way to convert Bitmap object into ByteArray. Thanx and plzzzzzzzzzz reply
Shanzay
-
Hi, I'm facing a problem while transmitting a live video on LAN using memory stream object. But when I run application,after some time,my system prompt me "Low virtual memory". Actually the reason is the Memory stream.As there are two ways to convert the BMP into Byte ARRAY i.e Stream or File so tell me any solution or any other better way to convert Bitmap object into ByteArray. Thanx and plzzzzzzzzzz reply
Shanzay
-
Hi, I'm facing a problem while transmitting a live video on LAN using memory stream object. But when I run application,after some time,my system prompt me "Low virtual memory". Actually the reason is the Memory stream.As there are two ways to convert the BMP into Byte ARRAY i.e Stream or File so tell me any solution or any other better way to convert Bitmap object into ByteArray. Thanx and plzzzzzzzzzz reply
Shanzay
Is this with a single stream? Are you sure that you are properly disposing of your stream objects after you have used them?
-
AtulRane wrote:
You can solve your problem by increasing the size of virtual memory.
Don't do this. If you are running out of virtual memory after you app has been running for a while, it's because your app has a memory leak. Make sure you are disposing of objects properly when they are done with. Use a tool like SysInternals process monitor to check how much memory your app is using, and if it is increasing over time.
Simon
-
AtulRane wrote:
You can solve your problem by increasing the size of virtual memory.
Don't do this. If you are running out of virtual memory after you app has been running for a while, it's because your app has a memory leak. Make sure you are disposing of objects properly when they are done with. Use a tool like SysInternals process monitor to check how much memory your app is using, and if it is increasing over time.
Simon
Simon Stevens wrote:
Don't do this. If you are running out of virtual memory after you app has been running for a while, it's because your app has a memory leak.
Exactly, increasing virtual memory is only going to buy a little more time, not much.
Simon Stevens wrote:
Use a tool like SysInternals process monitor to check how much memory your app is using
Or just use the Performance monitor in Administrative Tools.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon