c# - Library for defragmenting memory -
Does a DLL defragrate memory for a Windows 2003 server?
Here's the background: We have a clean ecommerce site that uses a pre-built framework for heavy lifting. When trying to allocate memory while adding objects to the cache, the website sometimes gets out of memory exceptions. This happens when the framework tries to add a large-eye dataset to the cache.
I understand that when you try to add something in the cache, it is necessary to use contingency memory to add the object, if it does not get a large part of the memory, Memory exceptions will be found.
ISI has already consumed 600MB of memory and the server often receives this problem when more than 10 or 20 MB is required. The server has 4 GB memory so IIS 2 should be able to use GB 2, but I think these are big objects that find a place to fit a problem. So my laughing work probably tries to catch an exception, runs an accelerated RAM defrague, and continues.
I know that it would be best to use small items, but I really do not want to change the framework to reverse engineer some parts of the caching code.
Cheers, Lance
First, defragmenting the physical structure of memory requires Not - the OS manages the pages of physical memory and presents it in the application form as a continuous 2GB address space. How is this memory managed then (i.e. CLR in case of a .NET application)
mostly in CLR, GC (I believe that .NET 4.0 CLR has made some changes in this area ) Uses a conventional "linked-list" allocation for a large object pile and does not compact the stack due to the large amount of memory running around it.
This means that if you are allocating large size objects that have different sizes and different births You can easily eliminate split memory and memory exceptions as you have seen.
I have never seen memory "defragmenter" DLL, in order to be able to do this, you have to have full control over GC and CLR to ensure that it updates any reference.
Two things are trying:
1) If you can clear objects from the cache, then you can release some objects when you exit the memory up Are there.
2) .NET 4.0 CLR to see if the status quo improves n.
Comments
Post a Comment