I sometimes use the [php-memory-profiler](https://github.com/arnaud-lb/php-memory-profiler) with your library to debug memory usage of my projects. This extension has a nice feature that allows to automatically dump a memory profile when the process crash because of a memory limit. It could be cool to have this feature for this extension.