Thank you for this explanation! You are a great teacher and this helped me fix my memory leak in one hour instead of one week
@MikeShah Жыл бұрын
Cheers!
@JackSparrow-tt3xg7 ай бұрын
Professionals Use : GDB Legends use : printfs logs
@MikeShah7 ай бұрын
🤣 Sometimes all you have is printf :)
@MrNaderz3 жыл бұрын
You're a great educator Mike
@MikeShah3 жыл бұрын
Thank you Salim!
@shawnkuo65665 ай бұрын
Seriously, how do you resize the left half screen at 5:54 ?
@MikeShah5 ай бұрын
Check out my tmux tutorial: kzbin.info/www/bejne/bpfdp4OwarVjh5Y (Around the 3 minute mark I show you how to move and split windows)
@paulfloyd925811 ай бұрын
Even more fun (for users): using valgrind vgdb and gdb together.
@MikeShah11 ай бұрын
Cheers -- agreed!
@parul94552 ай бұрын
After adding printf, why memory allocated is 1056 bytes, earlier it was 32 bytes
@MikeShah2 ай бұрын
timestamp? I suspect printf allocates, or at least on first use could allocate memory.
@stepside6874 Жыл бұрын
Thank you so much. It helps me a lot.
@MikeShah Жыл бұрын
Cheers!
@amitrastogi140511 ай бұрын
Excellent Video. Thanks!
@MikeShah11 ай бұрын
Cheers!
@sallaklamhayyen9876 Жыл бұрын
Thank you So Mike you are a great teacher by NATURE 😘
@MikeShah Жыл бұрын
Cheers, thank you for the kind words!
@eddyecko94 Жыл бұрын
Thanks. I’m a C++ guy but I like this
@MikeShah Жыл бұрын
Cheers!
@_Anna_Nass_ Жыл бұрын
Do you have a video that covers what you did in the first few seconds of this video? I understand the C code and why we got a seg fault but I'm not as familiar with the Linux command line.
@MikeShah Жыл бұрын
Ah, as far as the terminal goes, check out: the Terminal Masterclass in this playlist: kzbin.info/aero/PLvv0ScY6vfd-GGT-aUH31X2yXgBSYXo6t
@_Anna_Nass_ Жыл бұрын
@@MikeShah will do, thanks!
@sallaklamhayyen9876 Жыл бұрын
Mike since you are a professional C++ developer can you make a practical and hands on Object Oriented programming course and share with us your experience ?
@MikeShah Жыл бұрын
Will consider developing something in the future :)
@sallaklamhayyen9876 Жыл бұрын
@@MikeShah thank you for your time and efforts
@saranshgautam30116 ай бұрын
nice tutorial. very helpful!
@MikeShah6 ай бұрын
Cheers!
@vkatasonov6 ай бұрын
Hello, Mike. I wanted to ask if you having some problems using leaks on Mac 💻 with M chip? I was trying to use memory leaks monitoring using methods you were speaking about in other videos, but it seems with Sonoma I don’t have access to usr/bin 🤷♂️
@MikeShah6 ай бұрын
I can't remember if in that video I elevated my privileges to super user (sudo or su). That may have been necessary, or otherwise is one thing you can try. There's probably a better fix though than to have to get elevated priveleges -- though that is something I'll have to test when I upgrade my Mac.
@vkatasonov6 ай бұрын
@@MikeShah Thx a lot, if you will have answer to this issue I would be very appreciate. I'm trying to solve this problem as soon as I'm passing a huge course of C programming and that tool was absolutely magic for me. Everytime I run leaks --atExit-- , I have that crazy 2185 segmentation fault sudo leaks --atExit-- . I was trying to switch off SIP, but it still doesn't work. And it seems that $PATH I have introduce correctly because there is leaks tool in the system which leaks /usr/bin/leaks
@MikeShah6 ай бұрын
@@vkatasonov Worse case if you can use a VM on valgrind that should immediately reveal answers. Otherwise, this may be a helpful post in regards to Mac and Sonoma: forums.developer.apple.com/forums/thread/738804
@vkatasonov6 ай бұрын
@@MikeShah I was trying to use VM on UTM but valgrind there doesn’t work. The only solution I see is Docker with Linux or idx from google
@shaharrefaelshoshany94423 жыл бұрын
AMAZING !! best explanation
@MikeShah Жыл бұрын
Cheers!
@cprn.2 жыл бұрын
I'm disappointed you didn't mention you can run `valgrind --vgdb=yes` and connect gdb to valgrind.
@MikeShah2 жыл бұрын
Will have to be another video :)
@CarlosLeePerez3 жыл бұрын
I have two follow up questions about Valgrind. I am currently having difficulty getting to the stage you are on, thanks to my Linux Lite naivete. How would you recommend, I create the right environment on Linux Lite to go from merely having Valgrind installed to allowing the terminal to recognize the valgrind command, which you used? Secondly, is my asking this sort of question here in the comments a good way of reaching out to you?
@MikeShah3 жыл бұрын
Hi Carlos, yes comments are a good way to reach out, I try to give one response to as many as I can--though cannot debug 1:1 with folks :) If Ubuntu is an option, that'll setup the environment right away. If you're constrained to Linux Lite, then my guess is you're missing some base packages or dependencies for Valgrind. I'd reach out directly through their contact otherwise: www.valgrind.org/downloads/current.html
@matheens6689 Жыл бұрын
How to check vptr and v table in c++
@MikeShah Жыл бұрын
info vtbl will do the trick. I show some of this on my "Hands on Debugging" course on courses.mshah.io/