今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
What is a memory leak?
- [Instructor] So we call allocated memory that we can no longer access, because there's no pointer to it that we have, leak memory. Some programs are written so that by the time they finish, they have freed up all the memory that they dynamically allocated. Some programs don't do that. Some of the memory leak checking programs, run your program, and at the end they report any dynamically allocated memory that was not freed. That might not really be a leak, but it's something a little more straightforward to do. So it is better if you have the practice in your code to always free memory after you don't need it anymore, so that when the program finishes, if there is any still dynamically allocated memory, then that is a mistake and the tools can help you find that. There's also some tools that expect that the memory will be freed within a certain amount of time, like within two seconds after allocating it, you're going to…
内容
-
-
-
-
-
(已锁定)
What is a memory leak?6 分钟 53 秒
-
(已锁定)
/proc/meminfo, free, and swap space4 分钟 34 秒
-
(已锁定)
top and htop for memory usage2 分钟 45 秒
-
(已锁定)
CPU caches and page caches6 分钟 27 秒
-
(已锁定)
Examples of filesystem caching6 分钟 15 秒
-
(已锁定)
Page sizes and page faults11 分钟 17 秒
-
(已锁定)
BPF and Memory bottlenecks and leaks4 分钟 42 秒
-
(已锁定)
Challenge: Finding memory bottlenecks2 分钟 19 秒
-
(已锁定)
Solution: Finding memory bottlenecks6 分钟 55 秒
-
(已锁定)
-
-