Ok, it looks like GOROOT is managed by go. See go env
.
GOPATH seems like it needs to be managed still.
I've switched over to using go env
for my information
(OS, ARCH, VERSION). Which seems cleaner and clearer.
Ok, memory usage is about 1.8MB peak heap usage. (Tokio & non-async), so chunks and write_to work the same.
https://poby.medium.com/memory-profiling-using-valgrind-b30514f35117
No leaks. ;)
valgrind --tool=massif --stacks=yes --log-file=valgrind3.log target/release/go-up update massif-visualizer massif.out.2496324
## Valgrind memory usage
Logging total memory usage:
```cargo build --release; valgrind --log-file=memory1.log target/release/go-up update```
==2470578== HEAP SUMMARY: ==2470578== in use at exit: 796,398 bytes in 5,858 blocks ==2470578== total heap usage: 217,384 allocs, 211,526 frees, 269,243,726 bytes allocated ==2470578== ```