Debugging & Profiling Memory in Visual Studio

Learn to find and fix critical memory leaks and issues in C/C++ applications. This course teaches you to master Visual Studio's powerful debugging tools, including the CRT Debug Heap and memory snapshots, ensuring your programs are robust and efficient.

Image14

Course Description

This course equips you with the essential skills to identify and eliminate performance-sapping memory leaks and other critical memory issues in your C/C++ projects. You'll gain a deep understanding of memory allocation and common pitfalls, then master Visual Studio's powerful debugging tools, including the CRT Debug Heap and memory snapshots, to efficiently pinpoint and resolve memory errors, ultimately leading to more robust and reliable applications.

Curriculum

Understand in detail on what is planned under each module

Instructions

🧑‍🏫 Course Introduction

📄 Source Code

📊 Course Material

Process Memory Layout

Visual Studio Installation & Basic Usage

Quick Introduction to Visual Studio Debugging

Byte Ordering

Source code

Introduction To Debugging

Defensive Coding - I

Defensive Coding - II

Assertions

Assertions Guidelines

Compile-Time Assertions

Visual Studio Debugger

Debugging Basics

Watch

Breakpoints - I

Breakpoints - II

Callstack

Memory

More Debugging Features

📝 Assignment 1

📝 Assignment 2

Practice

Quiz

Memory Management Issues

Uninitialized Pointers - I

Uninitialized Pointers - II

Buffer Overflow - Stack

Buffer Overflow - Heap

Dangling Pointers - I

Dangling Pointers - II

Memory Leaks - I

Memory Leaks II

Source Files

String Class - I

String Class - II

String Class - III

String Class - IV

Detecting Heap Corruption in String

Heap Checker Class - I

Heap Checker Class - II

Heap Checker Class - III

Heap Checker Class - IV

Heap Checker Class - V

Quiz

Source Files

_CrtDumpMemoryLeaks() function

_CrtDumpMemoryLeaks() Example

Leak Detection Flags

Detailed Leak Dump

Exercise

Memory Snapshots - I

Memory Snapshots - II

Memory Checkpoint Class

Issues with checkpoints

Snapshots in Visual Studio - I

Snapshots in Visual Studio - II

Report Modes & Types - I

Report Modes & Types - II

Redirecting to File

Quiz

Slide Deck

Source Code

Introduction

Setup

Shadow Memory

Heap Buffer Overflow

Heap Use After Free

Allocation Routine Mismatch

Stack & Global Memory

Global Memory Issues

Stack Memory Issues

User Poisoned Memory

User Poisoned Memory Examples

Conditional Compilation

Disabling Instrumentation

Disabling Instrumentation Examples

More Options

ASan Options Examples

Quiz

Final Assignment

🏅 Course Certificate

Why Do This Course

Learn to identify and fix memory leaks that can slow down your applications and lead to crashes over time.

Gain a deep understanding of how memory is allocated and deallocated in C/C++, including both C-style and C++-style operators and their internals.

Recognize and debug issues like uninitialized pointers, buffer overflows, and dangling pointers that can introduce severe vulnerabilities.

Leverage the robust memory debugging capabilities of Visual Studio, including the CRT Debug Heap, to quickly find and resolve memory errors.

Learn to use memory snapshots, detailed allocation dumps, and custom helper classes to pinpoint the source of leaks efficiently.

Requirements

  • Basic knowledge of C++
  • Modern C++ compiler (Visual Studio 2022, gcc 13, clang 17)

Reviews

See what other students have to say about the course

nice

Shiv

Awesome

Ata Karim

Excellent

Balbir

Excellent

Balbir

5 star

Vinay

Good Course, nice explanation of concepts along with practical application.

Pushp

The course is really well structured and helps a lot

Anusha

learnt a lot of things, especially address sanitizer can be very helpful for memeory issues.

Himanshu

Related Courses

Additional courses that may be relevant to your interests

Image23

Instructor


- Hello! I'm Umar Lone

I've educated and mentored students and professionals globally, leveraging over 20 years of experience in C++, Object-Oriented Programming, Design Patterns, and related technologies. My professional background includes significant contributions to C++, Java, and C# projects with esteemed companies, alongside providing specialized project consultation & mentoring.


My current focus is on delivering comprehensive video courses that distill this extensive knowledge. I specialize in transforming intricate concepts into clear, practical, and actionable insights, supported by real-world examples. This approach is designed to equip you with the necessary clarity and confidence for sustained growth and impactful contributions within your projects and career trajectory.


Begin your learning journey with me now and unlock the advanced understanding and practical expertise essential for making a significant impact in your field.


Keep in touch

Subscribe for announcements, new courses & discount coupons

Yes please, save my details so you can send me educational content that is relevant and helpful.