Message ID | 20220722122137.3270666-1-adhemerval.zanella@linaro.org |
---|---|
Headers | show |
Series | Add arc4random support | expand |
On the BSDs the state is allocated with mmap...that would allow it to safely use it within the malloc implementation..(or paths that should not call malloc for whatever reason) just wondering why changing was a choice.
On 22/07/22 16:12, Cristian RodrÃguez wrote: > On the BSDs the state is allocated with mmap...that would allow it to > safely use it within the malloc implementation..(or paths that should > not call malloc for whatever reason) > just wondering why changing was a choice. Because it was easiest solution to provide lazy allocation for the internal buffer, on a previous version I added on TCB but Florian asked to move to a dynamic buffer because it was too large to impose on every thread (I tend to agree). I plan to revise and maybe add a custom allocator so we can also use MADV_DONTFORK.