mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Free everything at shutdown
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Peter Zhu <peter@peterzhu.ca>
This commit is contained in:
parent
b361a800c2
commit
6816e8efcf
27 changed files with 285 additions and 6 deletions
6
random.c
6
random.c
|
@ -157,6 +157,12 @@ rand_start(rb_random_mt_t *r)
|
|||
|
||||
static rb_ractor_local_key_t default_rand_key;
|
||||
|
||||
void
|
||||
rb_free_default_rand_key(void)
|
||||
{
|
||||
xfree(default_rand_key);
|
||||
}
|
||||
|
||||
static void
|
||||
default_rand_mark(void *ptr)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue