Using Leaks (the valgrind equivalent) on Mac (Shown on M1) to detect memory leaks

preview_player
Показать описание

►Lesson Description: In this lesson I show you how to use leaks to to detect memory leaks on the Mac. Leaks is the equivalent tool that will run on Mac machines (including M1).

00:00 Introduction
00:37 Example Faulty Program Overview
2:00 Introduction to Leaks
2:52 Running Leaks

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

I've worked 3 hours to find an alternative to valgrind in mac and this video literally made my day thanks

gulizarilgen
Автор

Thanks for this Video. Nice one. Since too many issues in installation of valgrind on MAC M1(ARM)

SubramaniyamKMV
Автор

Actually helped me to find out places I forgot to free, tho I didn't manage to get the line numbers

rongqirichiewang
Автор

Thank you for this helpful video! Is it correct that there is no library to apply assert like methods to detect leaks? Essentially there are only terminal based tools? The reason I ask is thinking about this in the context of a CI/CD automation, would someone need to setup the command line utility to run and check the code base or could it just be one of the series of tests?

damondouglas
Автор

Cool thank you for this video, It's been a while that I've been looking for an alternative to valgrind on mac

brunojacob
Автор

THANK YOU!! My class is supposed to use Valgrind but I can't get it to work on my Mac. Is there anything Valgrind does that this doesn't?

ayodd
Автор

Thank you for the video! I'm having a hard time finding exactly where the leaks are in my code because there aren't any lines mentioned in the leak report, and in my class we just started using cmake files so I'm not sure how to run with debug symbols. Is there a way to use debug symbols with cmake, or another way to show the line numbers?

maurasweeney
Автор

Thanks for this video, this is really helpful! I was wondering if you've encountered an issue that says a process isn't debuggable because "for security, cannot load non-system library"?

TheBloodlessOne
Автор

Idk why after export MallocStackLogging I have warning, for example:

-> export MallocStackLogging=1
-> ls .
ls(5316) MallocStackLogging: could not tag MSL-related memory as no_footprint, so those pages will be included in process footprint - (null)
ls(5316) MallocStackLogging: stack logs being written to
ls(5316) MallocStackLogging: recording malloc and VM allocation stacks to disk using standard recorder
ls(5316) MallocStackLogging: stack logs deleted from

Dream-hzti
Автор

Very helpful, thanks! can you explain more about "export MallocStackLogging=1 "?

אוריןלוי-בה
Автор

If anyone needs this to turn off the MallocStackLogging in the terminal... set MallocStackLogging=0 doesn't turn it off.

"unset MallocStackLogging"

dwolrdcojp
Автор

not to be pedantic, i want to share this for new programmers: you might not always want to/care enough to free.
most unix cmd utilities don't free resources unless it is necessary logically, due to the assumption that the utility will run and exit really quickly.
if you have a long running program, however, obviously you should free resources

johannsebastianbach
Автор

HI Mike ! Thanks for your video. I tried to do the exact same thing as you mentioned in your video with a file. It works but i have a problem. there aren't any lines mentioned for the leaks so I can't check in my code where exactly i need to look at..

marcello_s
Автор

how do you turn off the stack logging afterwards?

alexreade
Автор

thank you for making this video! it was very helpful ^^

emielia.
Автор

TOP! Im using macOS Monterey but the leaks tool show everything but not the source code with the leak. Do you have any tips (leaks Report Version: 3.0)?

paulocoutinhox
Автор

Are there any C++ IDEs free for students that have Leaks support? I've been having trouble finding any IDEs for later MacBook versions that support any sort of memory leak detection.

roguechlnchllla
Автор

How to installe it ? Homebrew does not have a « leaks » package

adampaul
Автор

How to handle if my excutable uses a dynamic library?

StandardLoop
Автор

Is there a way to locate invalid reads too? (e.g. Reading freed memory).

anderslagerqvist