G
Guest
Hi
I am working on a pure managed windows application that creates large byte arrays at run time. In fact it creates a 50M byte array when the application starts
public static byte[] buffer = new byte[1024*1024*50]
I am using System.GC.GetTotalMemory() to monitor the memory usage. It is consistent with what I can imagine. The memory usage is a little bit above 50M. During runtime this application reads large files (between 25 to 46MB) but it does not reallocate buffer. Each time only one file can be processed and the above 50MB buffer is used
However, if I use Windows Task Manager/Processes and check the memory usage of this application, I see the memory usage is between 75 to 130 MB. This result in some serious diskswapping activities on a PC with 256MB memory
Do you know why there is a discrepency of mem usage between the runtime reports and what the OS reports
I am using .NET SDK1.1 on XP Pro and Win Server 2003
Thank you for your help
I am working on a pure managed windows application that creates large byte arrays at run time. In fact it creates a 50M byte array when the application starts
public static byte[] buffer = new byte[1024*1024*50]
I am using System.GC.GetTotalMemory() to monitor the memory usage. It is consistent with what I can imagine. The memory usage is a little bit above 50M. During runtime this application reads large files (between 25 to 46MB) but it does not reallocate buffer. Each time only one file can be processed and the above 50MB buffer is used
However, if I use Windows Task Manager/Processes and check the memory usage of this application, I see the memory usage is between 75 to 130 MB. This result in some serious diskswapping activities on a PC with 256MB memory
Do you know why there is a discrepency of mem usage between the runtime reports and what the OS reports
I am using .NET SDK1.1 on XP Pro and Win Server 2003
Thank you for your help