#radio Radio Scotland by EnjoyIT 1.0 http://t.co/gaNHe2KU
25 minutes ago by RealTonyRocha on twitter
ZDNet is available in the following editions:
When you notice memory issues cropping up in your .NET applications, turn to the freely available CLR Profiler. It allows you to take a peek under the hood of .NET applications and monitor the garbage collector heap.
In the .NET Framework, memory management is supposed to be handled automatically by the system. This allows you to concentrate on the important issues of application design and development. Unfortunately, this utopia has not been completely realized as memory issues still appear in .NET-based applications. This article examines one tool--the CLR (Common Language Runtime) Profile--that you may use to track down memory issues.
Garbage collection
The .NET platform adopted the garbage collection approach used in Java. That is, the .NET system tracks all
memory blocks allocated in an application. It knows when memory is allocated
and what monitors it uses. The system also knows when it is no longer used and frees it up. The
garbage collector handles these tasks, but it does not totally divorce you from
understanding memory allocation.
Objects in .NET are allocated from an area of memory called the managed heap. The heap is described as managed because, after you ask it for memory, the garbage collector takes care of its cleanup.
Garbage collection begins by assuming all objects are unnecessary until proven otherwise. An object proves that it is necessary essentially by its references, or who it is referenced by. If the object is necessary, it is not part of the garbage collection cycle. On the other hand, if the object is not necessary, the object is flagged to be discarded.
While garbage collection is an automatic process, you should still be aware of how memory is utilized in an application. This allows you to decide if the application is properly using its memory and how the garbage collector is being utilized. This involves knowing the life of objects used to determine how often garbage collection is called in order for you to determine if the garbage collector is taxed.
Code profilers can help with this process by providing a peek at the inner workings of an application, allowing you to gain a better understanding of memory usage. The .NET CLR includes a profiling API that you may use to write custom profilers for managed applications. There are plenty of commercial profiler tools available, but Microsoft provides a free one called the CLR Profiler.
CLR Profiler
The download
is comprised of a single installation program that places the tool on your system. In addition, extensive documentation is included.
The CLR Profiler allows you to take a peek under the hood of a .NET application
and see what is happening as it runs. It also lets you monitor what is
happening with the garbage collector heap. By installing the CLR Profiler, you
can access the following information about an application:
The data used by the CLR Profiler is stored in self-contained log files. The application provides both Windows client and command-line interfaces.
The tool does affect application performance as it churns out log data, so be careful when/if using it with applications in a production environment. In addition, the size of the log data files can become overwhelming depending on what is being logged, so be wary of disk space. Finally, the CLR Profiler starts the application it will be profiling, so you cannot attach it to currently running processes.
Running the application is easy via the Windows client interface. The simple interface allows you to start and stop profiling, as well as view the current contents of the heap. In addition, you can start and stop profiling (a good option if you're only profiling during certain operations) via a checkbox.
A log file is created once profiling has been stopped. You can see various graphs/reports called views to get an idea of memory usage by the profiled application. The views allow you to track object creation, memory consumed by objects, heap size, the type of objects created, and so forth. This is all available via graphs, so the data is friendly to the eyes (as opposed to scanning a log file).
Commercial tools
If you find that the CLR Profiler falls short in your
profiling needs, there are a variety of third-party tools on the market. The
following list provides a sampling of these products.
Tony Patton began his professional career as an application developer earning Java, VB, Lotus, and XML certifications to bolster his knowledge.
#radio Radio Scotland by EnjoyIT 1.0 http://t.co/gaNHe2KU
25 minutes ago by RealTonyRocha on twitterSingTel (All) SingTel acquires HungryGoWhere for $9.4M ZDNet Asia News http://t.co/QuzQio2Z
55 minutes ago by nyp_095370X on twitterIntranets need social to survive http://t.co/pdOHvgBP #intranet #socialintranet #intranet20
1 hour ago by hoisc on twitterFanboys on AV for Mac: "ludicrous" "a waste of time" "The Mac will protect me" "the most secure ever" "impenetrable" http://t.co/a1o2Sz7E
3 hours ago by defintel on twitterRT @ameliatmy: the hottest angel investment & venture capital event in #MALAYSIA! will u be there? http://t.co/ChSjkmzu #ABAF
3 hours ago by seraphine on twitterSingapore Game Box in the ZDnet news!
http://t.co/UuTs0SqX http://t.co/YdPKmm39
RT @zdnetasia: SingTel acquires HungryGoWhere for US$9.4 million. http://t.co/Qho1REVZ
4 hours ago by molobok on twitterGartner: Mobile CRM gives better ROI than social - http://t.co/s5OfTAXK #CRM
4 hours ago by RichBohn on twitterRT @zdnetasia: S'pore sets up portal to grow games sector. http://t.co/In8gtj7L
4 hours ago by molobok on twitter#Malaysia: 20% yoy rise in overall #wages for both direct and non-direct labor. http://t.co/5T2e0LUU
4 hours ago by mikebuetow on twitterRT @mikebuetow: #Malaysia: 20% yoy rise in overall #wages for both direct and non-direct labor. http://t.co/5T2e0LUU
4 hours ago by PhotoStencilLLC on twitter@88tc88 RT @KevinZDNetAsia: User experience more important to app monetization than actual content http://t.co/ogbD5wyI… #li #dm12
4 hours ago by eelisam on twitterDubbed the first social #Olympics, this year's summer games have some of the strictest social rules for all involved http://t.co/4HlcqhW3
5 hours ago by 5Loom on twitterValue of big data analytics largely untapped - Zd Net http://t.co/ZuhPrCN4: Pushing cloud limits for d... http://t.co/VyOU0vHz #TheBIBlog
5 hours ago by nextbi on twitterSo much as we know , MTK6575 extremely integrated frequency1GHz ARM Cortex-A9 processor, the superiority of 3G / HSPA Modem, and help the...
16 hours ago by y15822137359 on 5 SaaS adoption speed bumps to avoidI reckon your view: "CRM is strategy, not software", if a company replicating the approach uses in ERP implementation into CRM, what they...
1 day ago by wykoong on Gartner: Mobile CRM gives better ROI than socialThis video will teach you about the Excel fill handle but also provide you with a workook to download... http://www.youtube.com/watch?v=...
2 days ago by TradeBrother on A quick fill handle trick for Microsoft Excelwaiting...
4 days ago by eapete on What should count in a company's market value?Boy, you've opened a can of worms now.
Wait for the rants & raves.
I was puzzling before this whether to replicate the success formula we executed for a financial institute, and come out with a standard s...
4 days ago by wykoong on Drop the egos, copy ideas, then innovateEchelon 2012 - The Awesomer Tech Event in Asia
Echelon 2012 – SEA’s longest running tech startup event goes Awesomer. Catch 50 of Asia’s most promising startups & over 40 international speakers on June 11-12.
Startup Asia Jakarta showcases new product-ready tech startups. Plus: hackathon, exhibition, and speakers. Use promo code CBSi50 for 50% discount.
ZDNet Asia Intelligent Singapore video series
Featuring inteviews with CXOs who define "intelligence" in their markets and reveal how their companies drive business efficiencies through ICT.