Mô tả

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.

Bạn sẽ học được gì

Understand different kinds of problems associated with memory management

Effectively detect & isolate memory issues

Gain confidence in C/C++ memory management

Understand and use the facilities provided by Visual Studio for detecting memory issues

Yêu cầu

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

Nội dung khoá học

7 sections

Introduction

9 lectures
Slide Deck
00:05
Process Memory Layout
05:54
Pointers
02:18
Using Visual Studio
04:54
Debugging In Visual Studio
05:51
Byte Ordering
06:08
C Allocation Functions Overview
03:58
C Allocation Functions - malloc, calloc
04:33
C Allocation Functions - realloc
04:44

Dynamic Memory Allocation in C++

15 lectures
C++ Allocation Operators
06:09
How new works - Part I
02:52
How new works - Part II
07:08
Handling new Failure - Exception
03:17
Handling new Failure - Handler
03:08
Handling new Failure - nothrow
04:58
Non-throwing new Example - Part I
04:07
Non-throwing new Example - Part II
04:55
Source files for Lecture 15 & 16
00:06
Placement new - I
03:43
Placement new - II
08:43
Placement new - III
08:38
Placement new - IV
04:39
Placement new - V
06:14
Operator new & delete Functions
07:24

Memory Management Issues

9 lectures
Memory Management Issues
02:26
Uninitialized Pointers - I
06:14
Uninitialized Pointers - II
06:14
Buffer Overflow - Stack
06:53
Buffer Overflow - Heap
05:51
Dangling Pointers - I
02:21
Dangling Pointers - II
05:53
Memory Leaks - I
06:09
Memory Leaks - II
05:10

Detecting Heap Corruption

11 lectures
Source Code for String & Heap Checker
00:02
String class - I
04:16
String class - II
03:43
String class - III
06:35
String class - IV
08:34
Detecting Heap Corruption in String Class
06:32
Heap Checker Class - I
06:13
Heap Checker Class - II
05:15
Heap Checker Class - III
05:06
Heap Checker Class - IV
07:12
Heap Checker Class - V
07:39

Detecting Memory leaks

15 lectures
_CrtDumpMemoryLeaks() function
03:41
_CrtDumpMemoryLeaks() Code Example
06:19
Leak Detection Flags
03:01
Detailed Leak Dump For new
07:14
Assignment
00:14
Memory Snapshots
02:30
Memory Snapshots - Code Example
07:42
Memory Checkpoint Helper Class
05:13
Issues With Checkpoints (& Resolution)
08:51
Snapshots in Visual Studio - I
06:04
Snapshots in Visual Studio - II
05:48
Source files for Reports
00:02
Report Mode & Type
03:23
Report Mode & Type - Code Example
06:51
Report Mode File
04:04

Custom Leak Detector

8 lectures
Source Files
00:02
Leak Detection Internals
04:57
Memory Block Header & ptmalloc() Function
08:58
Implementation Of ptfree() Function
06:46
Implementation Of PtDumpLeaks() Function
09:48
Adding C++ Support - I
08:10
Adding C++ Support - Part II
07:23
Compiling on Linux
06:43

Heap Corruption Support

6 lectures
Detecting Heap Corruption - Internal Implementation
03:31
PtCheckMemory() Implementation - I
04:42
PtCheckMemory() Implementation - II
05:23
Alignment & Structure Padding
05:21
Aligning Memory Block Header
07:32
BONUS LECTURE
00:01

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.