82639e6f53
Previously we used thread-local state objects in rand.c. However, for applications with large numbers of threads, this can lead to excessive memory usage. This change causes us to maintain a mutex-protected pool of state objects where the size of the pool equals the maximum concurrency of |RAND_bytes|. This might lead to state objects bouncing between CPUs more often, but should help the memory usage problem. Change-Id: Ie83763d3bc139e64ac17bf7e015ad082b2f8a81a Reviewed-on: https://boringssl-review.googlesource.com/29565 Commit-Queue: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> Reviewed-by: David Benjamin <davidben@google.com> |
||
---|---|---|
.. | ||
asm | ||
ctrdrbg_test.cc | ||
ctrdrbg_vectors.txt | ||
ctrdrbg.c | ||
internal.h | ||
rand.c | ||
urandom.c |