diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-12-19 15:16:33 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-12-19 15:16:33 -0500 |
| commit | 221f4ad7ea257d7d65598e89799cb389d6d5932d (patch) | |
| tree | 03752fbc6042c3241f6fde70eb843e60e6b7bf7a /stdlib/stdlib.c | |
| parent | 88d1bde371ba6bec42952f7cce242afd41f524d9 (diff) | |
Default RNG now uses static, thread-local memory instead of heap
allocated
Diffstat (limited to 'stdlib/stdlib.c')
| -rw-r--r-- | stdlib/stdlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index c7f1c13b..cb9d2213 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -54,7 +54,7 @@ public void tomo_init(void) if (read(rng_fd, (void*)random_bytes, 40) < 40) fail("Couldn't read from /dev/urandom"); Array_t rng_seed = {.length=40, .data=random_bytes, .stride=1, .atomic=1}; - default_rng = RNG$new(rng_seed); + RNG$set_seed(default_rng, rng_seed); if (register_printf_specifier('k', printf_text, printf_text_size)) errx(1, "Couldn't set printf specifier"); |
