Fix/max memory strategy

Brings down measured memory usage

```
var_dump(memory_get_usage(), gc_collect_cycles(), memory_get_usage());
int(35431248)
int(26585)
int(29614264)
```