make memory_use() cross-platform, rm peak option
make test more flexible
Merge branch 'memoryuse'