Fix memory leak of rb_ast_t in parser
rb_ast_t
Do not allocate rb_ast_t in ast_alloc to avoid memory leak.
ast_alloc
For example:
10.times do 100_000.times do eval("") end puts `ps -o rss= -p #{$$}` end
Before:
17568 20960 24096 27808 31008 34160 37312 40464 43568 46816
After:
14432 14448 14496 14576 14592 15072 15072 15072 15072 15088
Fix memory leak of
rb_ast_tin parserDo not allocate
rb_ast_tinast_allocto avoid memory leak.For example:
Before:
After: