collect cycles before measuring memory
measure once
Merge pull request #126 from basz/fix/max-memory-strategy

Fix/max memory strategy