2. Agenda
Why we need to use Memory Profiler
Basic Under Standing Of CLR
What is Garbage Collection
Basic understanding of Memory Profiler
How to fix Memory Leaks
3. Pre .NET Application Execution
VB6
Non.Net Application
VB6 Compiler
Assembly(.DLL or .EXE)
(Native Code or Machine Code)
Operating System
4. .NET Application Execution
.NET Application
C# VB C++ J# Others
Compile Using Respective Language Compiler
Assembly(.dll,.exe) – Intermediate Language
Intermediate Language
JIT Compiler
Native Code
C
L
R
Operating System
27. Memory Management
Stack Heap
Static void main()
{
person p=new person(Ramesh,22);
p=new person(Ram,22);
}
Person
Name: Ramesh
Age:22
P 0X123456
Person
Name: Ram
Age:22
Garbage Collector Runs
28. Memory Management
Stack Heap
Static void main()
{
person p=new person(Ramesh,22);
p=new person(Ram,22);
}
P 0X123456
Person
Name: Ram
Age:22
29. Memory Management
.NET Manages Memory Automatically
• Creates objects onto managed memory Blocks
• Destroys Objects No Longer in Use
30. Memory Management
.NET Manages Memory Automatically
• Creates objects onto managed memory Blocks
• Destroys Objects No Longer in Use
Allocates objects onto one of two heaps
• Small object Heap(SOH)- Objects <85k
• Large object Heap(LOH)- Objects >=85k
43. Memory Problems
Excessive RAM Footprint
• App allocates memory too early or too long
using more memory than needed
• Can Affect other Apps on the System
Excessive Temporary Object Allocation
• Garbage Collection Runs More Frequently
• Executing threads freeze during Garbage
Collection
Memory Leak
Overlooked root references keep objects alive
47. RECAP
•Pre .NET Execution of Application
•.NET Execution of Application
•What is CLR.
•Different types of Memory (Stack, Heap)
•Garbage Collection
•Gen 0,Gen 1,Gen 2
•Memory Problems
•What to Look For
48. Memory Profiling and .NET Memory Profiler
• What is Memory Profiling?
• What is .NET memory profiler?
• How to use .NET memory profiler?
• How to find memory leaks?
• Automatic Memory Analysis
49. What is .NET memory profiler?
.NET Memory Profiler is a powerful tool for finding
memory leaks and optimizing the memory usage in
programs written in C#, VB.NET or any other .NET
Language.
This tool will not fix any memory leaks or bad memory
consumption issues, but will analyze the running
application code and provide results that will be helpful for
us to fix memory issues and to code accordingly.
50. How to use .NET memory profiler?
To profile the memory of an application perform the
following steps:
1. Select the Profile Application command from the menu or toolbar.
2. Use the Browse button or the drop-down list to select the
executable file of the application you want to profile.
3. If you want to supply program arguments, enter the command
line in the Command line arguments field.
4. If you want to profile using the default settings, click Start to start
the application.
5. If you want to modify settings, you can use the Next button to
modify some common settings.
6. When you have decided on the settings, click Start to start the
application.
51. How to use .NET memory profiler?
For analysing the real - time data, check real – time data box on right
panel.
Below is the Total instances, Total bytes and Allocations/sec data of
VLEX captured in Real time:
52. How to find memory leaks?(Manual)
To find the memory leak manually, you can perform the
following steps:
1. Start profiling the application
2. Perform the task you suspect are leaking memory (e.g., open a
document, work with it, and then close it).
This will make sure that all static instances are created.
3. Collect a heap snapshot.(For doing so, click on the camera button
on the right panel)
4. Repeat the task performed under step 2.
5. Collect another heap snapshot.
6. Use the Show types drop-down list to select “With New or
Removed Instances” to show types whose set of instances has
changed between the two snapshots.
53. How to find memory leaks?(Manual)
7. To Select the Types page and try to locate a type that has live
instances that should have been collected.
If no memory leak exists, the instances shown in the Types page should
only be short-lived instances that have not been garbage collected yet.
If a memory leak exists, you should be able to find a type with new
instances that should have been garbage collected.
54. How to find memory leaks?(Manual)
8. Double-click on the type that has live instances that should have been
9. In the Instances table, double-click on one of the new instances.
10. In the Root path table you will get information about why the
selected instance was not garbage collected.
55. Automatic Memory Analysis
Whenever a new snapshot comparison has been
performed, e.g., after collecting a snapshot or changing
the selected or comparison snapshot, .NET Memory
Profiler will start analysing the memory data.
As soon as the analysis is finished, any found issues will be
presented in info panels under the Types/Resources page,
the Type details page, and the Instance details page.
An example of summary issues presented in the info panel
under the Types/Resources page can be seen below:
57. Automatic Memory Analysis
The issues presented provide warnings, suggestions, and
information about common memory usage problems. The
severity of an issue is
Serious Warning : A serious warning indicates an issue that could,
with a high probability, cause memory usage problems, such as memory
or resource leaks.
Warning: A warning indicates an issue that could cause memory
usage problems, such as memory or resource leaks.
Minor Warning: A minor warning indicates an issue that could cause
bad memory or resource utilization, but it should not cause problems
like memory leaks.
Indirect Warning: An indirect warning indicates an issue that is
caused by another warning issue. The issue will contain information
about the issue that causes the direct warning.
The below and following notes on the template slides are to guide you only. In your final presentation, you may delete these notes and add relevant notes if any.
Title slide:
Title – should not exceed beyond 3 lines, font size 30-34, Arial Headings
(Font size for the title of the PPT can vary between 30-34, Arial Headings, Bold depending on the amount of text, however should not be smaller than 30 font size)
Name should not exceed beyond 1 line, Designation; font size to remain at 18, Arial Headings
Please keep the title slide simple, just the logo, title and name and designation to appear. No other graphic elements or any design, photograph, image can be added to this slide, alignment to remain the same
Agenda slide
Heading – Agenda - Font size 30, Arial Headings
Agenda points to be in Arial Body (font size 28)
Please restrict this slide with just 5 agenda points.
If you have more than 5 points on the agenda slide please add another slide.
If you have only 3 then you can use just one slide and delete the other 2 points.
Section breaker slide
Used for a section heading. You may add a sub heading not exceeding one line also here
Section heading – Arial Headings, bold, 34 font size, should not exceed beyond 1 line
Sub Head – Arial Headings, normal, 18 font size, should not exceed beyond 1 line
Vertical Image slide - paragraph text
Use this slide for a vertical image with text that flows in a running paragraph Text– font size 20, Arial Body
Click on the icon to add image, the size of the image will be automatically determined once inserted, do not alter the size of the image
In the text box on the right the font size should not be beyond 20, Arial normal, and ensure the maximum content used is aligned to the size of the image, content should not exceed beyond the size of the image
Section breaker slide with customer logo
Section heading – Arial Headings, 34, Bold
Sub head – Arial Headings, 18, normal
Used for a section heading. You may add a sub heading not exceeding one line also here
Section heading – Arial Headings, bold, 34 font size, should not exceed beyond 1 line
Sub Head – Arial Headings, normal, 18 font size, should not exceed beyond 1 line
Image slide
The image slides help you represent the topic visually. There are 4
options you can choose from for an image slide.
Title font size 30, Arial Heading
Click on the icon to add image, the size of the image will be automatically determined once inserted
In the text box below the image the content should not exceed beyond 2 lines, font size – 24, Arial normal
* Do not alter the size of the image
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Full Size Image slide
The image slides help you represent the topic visually.
Click on the icon to add image, the size of the image will be automatically determined once inserted
Except an image do not add any content in this slide
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Full Size Image slide
The image slides help you represent the topic visually.
Click on the icon to add image, the size of the image will be automatically determined once inserted
Except an image do not add any content in this slide
Full Size Image slide
The image slides help you represent the topic visually.
Click on the icon to add image, the size of the image will be automatically determined once inserted
Except an image do not add any content in this slide
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Full Size Image slide
The image slides help you represent the topic visually.
Click on the icon to add image, the size of the image will be automatically determined once inserted
Except an image do not add any content in this slide
Column content slide
This is a slide with 2 columns and you can have text in bullet points under each column. You can have separate header for each of the columns in the blue box provided on top of each of the columns.
Heading font size of the column should remain at 30 and the column content font size should not reduce beyond 16.
Full Size Image slide
The image slides help you represent the topic visually.
Click on the icon to add image, the size of the image will be automatically determined once inserted
Except an image do not add any content in this slide
Vertical Image slide - paragraph text
Use this slide for a vertical image with text that flows in a running paragraph Text– font size 20, Arial Body
Click on the icon to add image, the size of the image will be automatically determined once inserted, do not alter the size of the image
In the text box on the right the font size should not be beyond 20, Arial normal, and ensure the maximum content used is aligned to the size of the image, content should not exceed beyond the size of the image
Vertical Image slide - paragraph text
Use this slide for a vertical image with text that flows in a running paragraph Text– font size 20, Arial Body
Click on the icon to add image, the size of the image will be automatically determined once inserted, do not alter the size of the image
In the text box on the right the font size should not be beyond 20, Arial normal, and ensure the maximum content used is aligned to the size of the image, content should not exceed beyond the size of the image
Vertical Image slide - paragraph text
Use this slide for a vertical image with text that flows in a running paragraph Text– font size 20, Arial Body
Click on the icon to add image, the size of the image will be automatically determined once inserted, do not alter the size of the image
In the text box on the right the font size should not be beyond 20, Arial normal, and ensure the maximum content used is aligned to the size of the image, content should not exceed beyond the size of the image
Section breaker slide
Used for a section heading. You may add a sub heading not exceeding one line also here
Section heading – Arial Headings, bold, 34 font size, should not exceed beyond 1 line
Sub Head – Arial Headings, normal, 18 font size, should not exceed beyond 1 line
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Content Slide: This is usually the most frequently used slide in every presentation.
Use this slide for Text heavy slides. Text can only be used in bullet points
Title Heading – font size 30, Arial Heading
Slide Content – Should not reduce beyond Arial body font 16
If you need to use sub bullets please use the indent buttons located next to the bullets buttons in the tool bar and this will automatically provide you with the second, third, fourth & fifth level bullet styles and font sizes
Please note you can also press the tab key to create the different levels of bulleted content
Thank you slide with customer logo
Thank you slide with the customer logo:
Should have only the details shown here. Logo placement cannot be changed. Wipro logo to appear on the left as per our corporate guidelines.
Thank you– font size 30, Arial Headings
Name & Designation – font size 18, Arial Headings, not to exceed beyond 2 lines
Your/contact email id – font size 18, Arial Headings