I am profiling my application with Mem Profiler 3.0. I have noticed that application allocate Virtual Memory. No Wrappers, All objects are getting Disposed but 6-7 Mb of Virtual Memory allocation is observed. When profiling application i usually measure the Private Bytes/ Commited Bytes and i observed that the Virtual Memory allocations are High particularly when the any operation is performed for very first time. I am unable to find a way to Deallocate the Virtual Memory, Is there any way to deallocate the virtual memory? Is this a natural behavior of any .NET application?
The runtime allocates memory for its internal structures using VirtualAlloc. In a normal application there are quite a few other libraries loaded as well, and they might also allocate some memory using VirtualAlloc. I don't think that it's necessary to worry about 6-7 MB of Virtual Memory when profiling a .NET application. What you should keep an eye on is whether this memory usage increases. For example, if you perform some action and the memory usage increases each time the action is performed. If you see this behavior, it is probably a good idea to investigate the issue further.
So, I believe that this could be considered natural .NET behavior, and it is probably not possible to deallocate this memory.
SciTech Software AB
Users browsing this forum: Bing [Bot], Google [Bot] and 16 guests