Detecting Memory Leaks in CC Applications

Apply techniques to detect & isolate memory related errors in Visual Studio
Detecting Memory Leaks in CC Applications
File Size :
2.05 GB
Total length :
6h 13m



Umar Lone


Last update

Last updated 11/2020



Detecting Memory Leaks in CC Applications

What you’ll learn

Understand different kinds of problems associated with memory management
Effectively detect & isolate memory problems
Gain confidence in C/C++ memory management

Detecting Memory Leaks in CC Applications

Detecting Memory Leaks in CC Applications-screenshot


Fair knowledge of C & C++ is essential for this course
Not recommended for beginners


C++ is a large and complex language, but it gives programmers complete freedom when it comes to management of dynamic memory. This allows the programmers to allocate memory and manipulate it at runtime. That is why C++ is still a favorite language for high performance applications in various domains such as gaming, telecom, finance, aerospace, etc.However, it requires programmers to take great care while using dynamic memory, such as releasing acquired memory, taking care not to overstep memory boundary, etc. Otherwise, it could lead to problems such as dangling pointers, memory corruption, memory leaks, etc. This course will help you overcome all these problem by leveraging the excellent features that Visual Studio provides. It has a rich set of functions provided by the C/C++ runtime heap library. These functions can help detect memory leaks, overflows, etc. You’ll learn how to use these functions effectively and make your programs bug-free.In this course, you’ll start with the basics of heap memory management and understand C & C++ allocation functions/operators in depth. You’ll also learn how to effectively use them to avoid memory problems. Afterwards, you’ll learn about the Visual Studio heap library functions and understand how to use them in your code.By the end of this course, you’ll have a deep understanding of dynamic memory management. You’ll be able to use CRT heap functions effectively to detect & isolate memory problems. You’ll also implement the Visual Studio functions so that they can be used with any C++ compiler.Note:This course requires Visual Studio 2017 or a higher version.


Section 1: Introduction

Lecture 1 Process Memory Layout

Lecture 2 Pointers

Lecture 3 Using Visual Studio

Lecture 4 Debugging In Visual Studio

Lecture 5 Byte Ordering

Lecture 6 C Allocation Functions Overview

Lecture 7 C Allocation Functions – malloc, calloc

Lecture 8 C Allocation Functions – realloc

Section 2: Dynamic Memory Allocation in C++

Lecture 9 C++ Allocation Operators

Lecture 10 How new works – Part I

Lecture 11 How new works – Part II

Lecture 12 Handling new Failure – Exception

Lecture 13 Handling new Failure – Handler

Lecture 14 Handling new Failure – nothrow

Lecture 15 Non-throwing new Example – Part I

Lecture 16 Non-throwing new Example – Part II

Lecture 17 Source files for Lecture 15 & 16

Lecture 18 Placement new – I

Lecture 19 Placement new – II

Lecture 20 Placement new – III

Lecture 21 Placement new – IV

Lecture 22 Placement new – V

Lecture 23 Operator new & delete Functions

Section 3: Memory Management Issues

Lecture 24 Memory Management Issues

Lecture 25 Uninitialized Pointers – I

Lecture 26 Uninitialized Pointers – II

Lecture 27 Buffer Overflow – Stack

Lecture 28 Buffer Overflow – Heap

Lecture 29 Dangling Pointers – I

Lecture 30 Dangling Pointers – II

Lecture 31 Memory Leaks – I

Lecture 32 Memory Leaks – II

Section 4: Detecting Heap Corruption

Lecture 33 Source Code for String & Heap Checker

Lecture 34 String class – I

Lecture 35 String class – II

Lecture 36 String class – III

Lecture 37 String class – IV

Lecture 38 Detecting Heap Corruption in String Class

Lecture 39 Heap Checker Class – I

Lecture 40 Heap Checker Class – II

Lecture 41 Heap Checker Class – III

Lecture 42 Heap Checker Class – IV

Lecture 43 Heap Checker Class – V

Section 5: Detecting Memory leaks

Lecture 44 _CrtDumpMemoryLeaks() function

Lecture 45 _CrtDumpMemoryLeaks() Code Example

Lecture 46 Leak Detection Flags

Lecture 47 Detailed Leak Dump For new

Lecture 48 Assignment

Lecture 49 Memory Snapshots

Lecture 50 Memory Snapshots – Code Example

Lecture 51 Memory Checkpoint Helper Class

Lecture 52 Issues With Checkpoints (& Resolution)

Lecture 53 Snapshots in Visual Studio – I

Lecture 54 Snapshots in Visual Studio – II

Lecture 55 Source files for Reports

Lecture 56 Report Mode & Type

Lecture 57 Report Mode & Type – Code Example

Lecture 58 Report Mode File

Section 6: Custom Leak Detector

Lecture 59 Source Files

Lecture 60 Leak Detection Internals

Lecture 61 Memory Block Header & ptmalloc() Function

Lecture 62 Implementation Of ptfree() Function

Lecture 63 Implementation Of PtDumpLeaks() Function

Lecture 64 Adding C++ Support – I

Lecture 65 Adding C++ Support – Part II

Lecture 66 Compiling on Linux

Section 7: Heap Corruption Support

Lecture 67 Detecting Heap Corruption – Internal Implementation

Lecture 68 PtCheckMemory() Implementation – I

Lecture 69 PtCheckMemory() Implementation – II

Lecture 70 Alignment & Structure Padding

Lecture 71 Aligning Memory Block Header


C/C++ programmers who wish to understand memory management in depth,C/C++ programmers who wish to efficiently debug memory related errors

Course Information:

Udemy | English | 6h 13m | 2.05 GB
Created by: Umar Lone

You Can See More Courses in the IT & Software >> Greetings from

New Courses

Scroll to Top