Talk in English - US at phpday 2019
View Slides: https://speakerdeck.com/bitone/hunting-down-memory-leaks-with-php-meminfo
Short URL: https://joind.in/talk/4492c (QR-Code (opens in new window))
Profilers like Blackfire.io or Memprof give you the functions that use or free memory. But knowing what is inside the PHP memory allows to better understand the origins of memory leaks. The opensource PHP Meminfo extension gives you a synthetic view of the number of class instances in memory, the full list of objects and other structures, as well as the relations between them (class member, item in an array, etc…). Having access to these relationships information allows understanding why an item has not been removed from memory by following the references that are still pointing to it. This talk will start by explaining how the memory is managed in PHP (ref counter, cyclic reference garbage collector), as well as the effects of a memory leak on your application performances. Then we will analyze some memory leak case studies by using PHP Meminfo and how to fix them.