diff --git a/README.md b/README.md index b4a3ade..7022e51 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Heavily wip and not feature complete - [ ] Clean up code - [ ] Tests - [ ] Documentation +- [ ] Memory usage is pretty high. I believe flushing the files affects this and leads to memory peaks. Fix that. ## License MIT diff --git a/treasure_chest/development/.gitignore b/treasure_chest/development/.gitignore new file mode 100644 index 0000000..9562d40 --- /dev/null +++ b/treasure_chest/development/.gitignore @@ -0,0 +1 @@ +TESTFILE \ No newline at end of file diff --git a/treasure_chest/development/ALLOCATION.md b/treasure_chest/development/ALLOCATION.md new file mode 100644 index 0000000..b1fdf4f --- /dev/null +++ b/treasure_chest/development/ALLOCATION.md @@ -0,0 +1,13 @@ +# Debug memory allocation + +## Build test file +- 100 MB file: `if=/dev/random of=TESTFILE status=progress bs=1m count=100` + +## Steps + +1. `cargo install --features vendored-openssl cargo-instruments` + Installs _cargo-instruments_ without needing OpenSSL (macOS shenanigans -.-) +2. `cargo instruments -t Allocations (--release)` +3. Find PID +4. `kill -SIGINT [PID]` to stop gracefully without interrupting cargo-instruments. +5. XCode instrument _Allocations_ opens up automatically \ No newline at end of file