aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorJoe Richey <joerichey@google.com>2021-05-24 03:42:01 -0700
committerJoe Richey <joerichey@google.com>2021-05-24 03:42:01 -0700
commitb9573511c6deb13e9d56ff28d8420ed99509a742 (patch)
treeee4e314ceff92d77a9a36a57db5353fc55609aeb /security
parent6f97cc7522ebb2adc56c4bdb278e80bf7b9d3656 (diff)
Run the Garbage Collector in the timing loop
Running `crypto.PassphraseHash` in a loop allocates a lot of memory. Golang is not always prudent about collecting the garbage from previous runs, resulting in a OOM error on memory-pressured systems. With a `maxMemoryBytes` of 128 MiB, this change reduces the maximum resident memory for `fscrypt setup` to 141 MiB (was perviously 405 MiB) Signed-off-by: Joe Richey <joerichey@google.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions